/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('aligenie', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model LoginStateInfo {
  sceneCode?: string(name='SceneCode'),
  thirdUserIdentifier?: string(name='ThirdUserIdentifier'),
  thirdUserType?: string(name='ThirdUserType'),
  userId?: string(name='UserId'),
}

model ResultValue = {
  deviceOpenId?: string(name='DeviceOpenId', example='A963*0158'),
  deviceUnionIds?: [ 
    {
      organizationId?: string(name='OrganizationId', example='1**2'),
      deviceUnionId?: string(name='DeviceUnionId', example='1553*B0C3'),
    }
  ](name='DeviceUnionIds'),
  name?: string(name='Name', example='我的设备'),
  firmwareVersion?: string(name='FirmwareVersion', example='2.0.3'),
  mac?: string(name='Mac', example='b4:xx:xx:xx:65:2b'),
  sn?: string(name='Sn', example='1200xx048'),
}

model AddAndRemoveFavoriteContentHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model AddAndRemoveFavoriteContentRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openAddAndRemoveFavoriteContentRequest?: {
    favoriteCmd?: string(name='FavoriteCmd', description='This parameter is required.', example='ADD'),
    openSourceRawIdPair?: {
      extendInfo?: map[string]any(name='ExtendInfo'),
      rawId?: string(name='RawId', description='This parameter is required.', example='2105818057'),
      source?: string(name='Source', description='This parameter is required.', example='xiami'),
    }(name='OpenSourceRawIdPair', description='This parameter is required.'),
    packageType?: string(name='PackageType', description='This parameter is required.', example='CONTENT'),
  }(name='OpenAddAndRemoveFavoriteContentRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model AddAndRemoveFavoriteContentShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openAddAndRemoveFavoriteContentRequestShrink?: string(name='OpenAddAndRemoveFavoriteContentRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model AddAndRemoveFavoriteContentResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='121212121'),
  result?: boolean(name='Result', example='true'),
  success?: string(name='Success', example='true'),
}

model AddAndRemoveFavoriteContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddAndRemoveFavoriteContentResponseBody(name='body'),
}

/**
 * @summary 收藏/取消收藏
 *
 * @param tmpReq AddAndRemoveFavoriteContentRequest
 * @param headers AddAndRemoveFavoriteContentHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddAndRemoveFavoriteContentResponse
 */
async function addAndRemoveFavoriteContentWithOptions(tmpReq: AddAndRemoveFavoriteContentRequest, headers: AddAndRemoveFavoriteContentHeaders, runtime: Util.RuntimeOptions): AddAndRemoveFavoriteContentResponse {
  Util.validateModel(tmpReq);
  var request = new AddAndRemoveFavoriteContentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openAddAndRemoveFavoriteContentRequest)) {
    request.openAddAndRemoveFavoriteContentRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openAddAndRemoveFavoriteContentRequest, 'OpenAddAndRemoveFavoriteContentRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openAddAndRemoveFavoriteContentRequestShrink)) {
    body['OpenAddAndRemoveFavoriteContentRequest'] = request.openAddAndRemoveFavoriteContentRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddAndRemoveFavoriteContent',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/AddAndRemoveFavoriteContent`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 收藏/取消收藏
 *
 * @param request AddAndRemoveFavoriteContentRequest
 * @return AddAndRemoveFavoriteContentResponse
 */
async function addAndRemoveFavoriteContent(request: AddAndRemoveFavoriteContentRequest): AddAndRemoveFavoriteContentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new AddAndRemoveFavoriteContentHeaders{};
  return addAndRemoveFavoriteContentWithOptions(request, headers, runtime);
}

model AddSubHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model AddSubRequest {
  addSubscriptionInfoRequest?: {
    albumId?: string(name='AlbumId', example='51999575'),
    dailyStudyCnt?: int32(name='DailyStudyCnt', example='2'),
    playMode?: string(name='PlayMode', example='sequence'),
    scheduleInfo?: {
      daysOfWeek?: [ int32 ](name='DaysOfWeek'),
      hour?: int32(name='Hour', example='1'),
      minute?: int32(name='Minute', example='23'),
    }(name='ScheduleInfo'),
  }(name='AddSubscriptionInfoRequest'),
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', example='123'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id'),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', example='123'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='123'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo'),
}

model AddSubShrinkRequest {
  addSubscriptionInfoRequestShrink?: string(name='AddSubscriptionInfoRequest'),
  deviceInfoShrink?: string(name='DeviceInfo'),
  userInfoShrink?: string(name='UserInfo'),
}

model AddSubResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='B99D27ED-4E12-1414-9FDE-599C57C4B204'),
  result?: {
    albumId?: string(name='AlbumId', example='51999575'),
    dailyStudyCnt?: int32(name='DailyStudyCnt', example='2'),
    deviceId?: string(name='DeviceId', example='5874DBCCA3038FAA1A70A8060F07F26D'),
    id?: long(name='Id', example='81'),
    playMode?: string(name='PlayMode', example='sequence'),
    scheduleInfo?: {
      daysOfWeek?: [ int32 ](name='DaysOfWeek'),
      hour?: int32(name='Hour', example='12'),
      minute?: int32(name='Minute', example='23'),
    }(name='ScheduleInfo'),
    userId?: string(name='UserId', example='1152893538998276761'),
  }(name='Result'),
}

model AddSubResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddSubResponseBody(name='body'),
}

/**
 * @summary 新增订阅
 *
 * @param tmpReq AddSubRequest
 * @param headers AddSubHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddSubResponse
 */
async function addSubWithOptions(tmpReq: AddSubRequest, headers: AddSubHeaders, runtime: Util.RuntimeOptions): AddSubResponse {
  Util.validateModel(tmpReq);
  var request = new AddSubShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.addSubscriptionInfoRequest)) {
    request.addSubscriptionInfoRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.addSubscriptionInfoRequest, 'AddSubscriptionInfoRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.addSubscriptionInfoRequestShrink)) {
    query['AddSubscriptionInfoRequest'] = request.addSubscriptionInfoRequestShrink;
  }
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddSub',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/addSub`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新增订阅
 *
 * @param request AddSubRequest
 * @return AddSubResponse
 */
async function addSub(request: AddSubRequest): AddSubResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new AddSubHeaders{};
  return addSubWithOptions(request, headers, runtime);
}

model AuthLoginWithAligenieUserInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model AuthLoginWithAligenieUserInfoRequest {
  encryptedAligenieUserIdentifier?: string(name='EncryptedAligenieUserIdentifier', description='This parameter is required.', example='UYugfm/3Nb9q24AyES2rYmC5tIglSoDX3Mbna/vrldcjGPtC8VzFwo+CU5c4CHLjrK7ekskG2WVaevM5Zi9f0w=='),
  sessionId?: string(name='SessionId', description='This parameter is required.', example='dbe2eb4458302b9246c6da17fbc95f4b'),
}

model AuthLoginWithAligenieUserInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    expiredTimeLong?: long(name='ExpiredTimeLong', example='1659506854230'),
    loginStateAccessToken?: string(name='LoginStateAccessToken', example='d15aa92de679d0d225aa845268be19ee'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model AuthLoginWithAligenieUserInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthLoginWithAligenieUserInfoResponseBody(name='body'),
}

/**
 * @summary 通过指定精灵账号进行授权登录
 *
 * @param request AuthLoginWithAligenieUserInfoRequest
 * @param headers AuthLoginWithAligenieUserInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthLoginWithAligenieUserInfoResponse
 */
async function authLoginWithAligenieUserInfoWithOptions(request: AuthLoginWithAligenieUserInfoRequest, headers: AuthLoginWithAligenieUserInfoHeaders, runtime: Util.RuntimeOptions): AuthLoginWithAligenieUserInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.encryptedAligenieUserIdentifier)) {
    body['EncryptedAligenieUserIdentifier'] = request.encryptedAligenieUserIdentifier;
  }
  if (!Util.isUnset(request.sessionId)) {
    body['SessionId'] = request.sessionId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AuthLoginWithAligenieUserInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/authLoginWithAligenieUserInfo`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过指定精灵账号进行授权登录
 *
 * @param request AuthLoginWithAligenieUserInfoRequest
 * @return AuthLoginWithAligenieUserInfoResponse
 */
async function authLoginWithAligenieUserInfo(request: AuthLoginWithAligenieUserInfoRequest): AuthLoginWithAligenieUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new AuthLoginWithAligenieUserInfoHeaders{};
  return authLoginWithAligenieUserInfoWithOptions(request, headers, runtime);
}

model AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberRequest {
  sessionId?: string(name='SessionId', description='This parameter is required.', example='dbe2eb4458302b9246c6da17fbc95f4b'),
}

model AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    expiredTimeLong?: long(name='ExpiredTimeLong', example='1659506854230'),
    loginStateAccessToken?: string(name='LoginStateAccessToken', example='d15aa92de679d0d225aa845268be19ee'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponseBody(name='body'),
}

/**
 * @summary 通过手机号生成精灵账号进行授权登录
 *
 * @param request AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberRequest
 * @param headers AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponse
 */
async function authLoginWithAligenieUserInfoGeneratedByPhoneNumberWithOptions(request: AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberRequest, headers: AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberHeaders, runtime: Util.RuntimeOptions): AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.sessionId)) {
    body['SessionId'] = request.sessionId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AuthLoginWithAligenieUserInfoGeneratedByPhoneNumber',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/authLoginWithAligenieUserInfoGeneratedByPhoneNumber`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过手机号生成精灵账号进行授权登录
 *
 * @param request AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberRequest
 * @return AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponse
 */
async function authLoginWithAligenieUserInfoGeneratedByPhoneNumber(request: AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberRequest): AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new AuthLoginWithAligenieUserInfoGeneratedByPhoneNumberHeaders{};
  return authLoginWithAligenieUserInfoGeneratedByPhoneNumberWithOptions(request, headers, runtime);
}

model AuthLoginWithTaobaoUserInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model AuthLoginWithTaobaoUserInfoRequest {
  encryptedTaobaoUserIdentifier?: string(name='EncryptedTaobaoUserIdentifier', description='This parameter is required.', example='KsVgypxAipf+xNECMZV2ONMcheqiIoEGFvgx+T8s1oV6/euTK9+ImYvLVPsSqFDh'),
  sessionId?: string(name='SessionId', description='This parameter is required.', example='dbe2eb4458302b9246c6da17fbc95f4b'),
}

model AuthLoginWithTaobaoUserInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    expiredTimeLong?: long(name='ExpiredTimeLong', example='1659506854230'),
    loginStateAccessToken?: string(name='LoginStateAccessToken', example='d15aa92de679d0d225aa845268be19ee'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model AuthLoginWithTaobaoUserInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthLoginWithTaobaoUserInfoResponseBody(name='body'),
}

/**
 * @summary 通过指定淘宝账号进行授权登录
 *
 * @param request AuthLoginWithTaobaoUserInfoRequest
 * @param headers AuthLoginWithTaobaoUserInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthLoginWithTaobaoUserInfoResponse
 */
async function authLoginWithTaobaoUserInfoWithOptions(request: AuthLoginWithTaobaoUserInfoRequest, headers: AuthLoginWithTaobaoUserInfoHeaders, runtime: Util.RuntimeOptions): AuthLoginWithTaobaoUserInfoResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.encryptedTaobaoUserIdentifier)) {
    body['EncryptedTaobaoUserIdentifier'] = request.encryptedTaobaoUserIdentifier;
  }
  if (!Util.isUnset(request.sessionId)) {
    body['SessionId'] = request.sessionId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AuthLoginWithTaobaoUserInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/authLoginWithTaobaoUserInfo`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过指定淘宝账号进行授权登录
 *
 * @param request AuthLoginWithTaobaoUserInfoRequest
 * @return AuthLoginWithTaobaoUserInfoResponse
 */
async function authLoginWithTaobaoUserInfo(request: AuthLoginWithTaobaoUserInfoRequest): AuthLoginWithTaobaoUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new AuthLoginWithTaobaoUserInfoHeaders{};
  return authLoginWithTaobaoUserInfoWithOptions(request, headers, runtime);
}

model AuthLoginWithThirdUserInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model AuthLoginWithThirdUserInfoRequest {
  extInfo?: map[string]any(name='ExtInfo', example='{}', nullable=true),
  sceneCode?: string(name='SceneCode', description='This parameter is required.', example='wechat_ecology_openness'),
  thirdUserIdentifier?: string(name='ThirdUserIdentifier', description='This parameter is required.', example='o5qxy6EItZBasv2VZAf-MGwllHL4'),
  thirdUserType?: string(name='ThirdUserType', description='This parameter is required.', example='weChatUser'),
}

model AuthLoginWithThirdUserInfoShrinkRequest {
  extInfoShrink?: string(name='ExtInfo', example='{}', nullable=true),
  sceneCode?: string(name='SceneCode', description='This parameter is required.', example='wechat_ecology_openness'),
  thirdUserIdentifier?: string(name='ThirdUserIdentifier', description='This parameter is required.', example='o5qxy6EItZBasv2VZAf-MGwllHL4'),
  thirdUserType?: string(name='ThirdUserType', description='This parameter is required.', example='weChatUser'),
}

model AuthLoginWithThirdUserInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  dataObj?: {
    sessionId?: string(name='SessionId', example='dbe2eb4458302b9246c6da17fbc95f4b'),
  }(name='DataObj'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    expiredTimeLong?: long(name='ExpiredTimeLong', example='1659428051452'),
    loginStateAccessToken?: string(name='LoginStateAccessToken', example='bd9ccdb121ee950ddead51e943e081fe'),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model AuthLoginWithThirdUserInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AuthLoginWithThirdUserInfoResponseBody(name='body'),
}

/**
 * @summary 通过三方用户信息进行授权登录
 *
 * @param tmpReq AuthLoginWithThirdUserInfoRequest
 * @param headers AuthLoginWithThirdUserInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return AuthLoginWithThirdUserInfoResponse
 */
async function authLoginWithThirdUserInfoWithOptions(tmpReq: AuthLoginWithThirdUserInfoRequest, headers: AuthLoginWithThirdUserInfoHeaders, runtime: Util.RuntimeOptions): AuthLoginWithThirdUserInfoResponse {
  Util.validateModel(tmpReq);
  var request = new AuthLoginWithThirdUserInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.extInfo)) {
    request.extInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.extInfo, 'ExtInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.extInfoShrink)) {
    body['ExtInfo'] = request.extInfoShrink;
  }
  if (!Util.isUnset(request.sceneCode)) {
    body['SceneCode'] = request.sceneCode;
  }
  if (!Util.isUnset(request.thirdUserIdentifier)) {
    body['ThirdUserIdentifier'] = request.thirdUserIdentifier;
  }
  if (!Util.isUnset(request.thirdUserType)) {
    body['ThirdUserType'] = request.thirdUserType;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AuthLoginWithThirdUserInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/authLoginWithThirdUserInfo`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过三方用户信息进行授权登录
 *
 * @param request AuthLoginWithThirdUserInfoRequest
 * @return AuthLoginWithThirdUserInfoResponse
 */
async function authLoginWithThirdUserInfo(request: AuthLoginWithThirdUserInfoRequest): AuthLoginWithThirdUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new AuthLoginWithThirdUserInfoHeaders{};
  return authLoginWithThirdUserInfoWithOptions(request, headers, runtime);
}

model CheckAndDoVoipCallForHotelHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model CheckAndDoVoipCallForHotelRequest {
  bizData?: string(name='BizData'),
  calleeNick?: string(name='CalleeNick'),
  calleePhoneNum?: string(name='CalleePhoneNum'),
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    id?: string(name='Id'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    id?: string(name='Id'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo', description='This parameter is required.'),
}

model CheckAndDoVoipCallForHotelShrinkRequest {
  bizData?: string(name='BizData'),
  calleeNick?: string(name='CalleeNick'),
  calleePhoneNum?: string(name='CalleePhoneNum'),
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model CheckAndDoVoipCallForHotelResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  result?: {
    deviceTargets?: {
      code?: int32(name='Code'),
      data?: [ 
        {
          deviceIcon?: string(name='DeviceIcon'),
          deviceName?: string(name='DeviceName'),
          deviceType?: string(name='DeviceType'),
          online?: boolean(name='Online'),
          uuid?: string(name='Uuid'),
        }
      ](name='Data'),
      msg?: string(name='Msg'),
    }(name='DeviceTargets'),
    isStartCall?: boolean(name='IsStartCall'),
    passed?: boolean(name='Passed'),
    startCallResult?: {
      message?: string(name='Message'),
      retCode?: int32(name='RetCode'),
      retValue?: string(name='RetValue'),
      success?: boolean(name='Success'),
      traceId?: string(name='TraceId'),
    }(name='StartCallResult'),
  }(name='Result'),
}

model CheckAndDoVoipCallForHotelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckAndDoVoipCallForHotelResponseBody(name='body'),
}

/**
 * @summary 检查并拨打voip电话【酒店业务】
 *
 * @param tmpReq CheckAndDoVoipCallForHotelRequest
 * @param headers CheckAndDoVoipCallForHotelHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckAndDoVoipCallForHotelResponse
 */
async function checkAndDoVoipCallForHotelWithOptions(tmpReq: CheckAndDoVoipCallForHotelRequest, headers: CheckAndDoVoipCallForHotelHeaders, runtime: Util.RuntimeOptions): CheckAndDoVoipCallForHotelResponse {
  Util.validateModel(tmpReq);
  var request = new CheckAndDoVoipCallForHotelShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bizData)) {
    body['BizData'] = request.bizData;
  }
  if (!Util.isUnset(request.calleeNick)) {
    body['CalleeNick'] = request.calleeNick;
  }
  if (!Util.isUnset(request.calleePhoneNum)) {
    body['CalleePhoneNum'] = request.calleePhoneNum;
  }
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CheckAndDoVoipCallForHotel',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/checkAndDoVoipCallForHotel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 检查并拨打voip电话【酒店业务】
 *
 * @param request CheckAndDoVoipCallForHotelRequest
 * @return CheckAndDoVoipCallForHotelResponse
 */
async function checkAndDoVoipCallForHotel(request: CheckAndDoVoipCallForHotelRequest): CheckAndDoVoipCallForHotelResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new CheckAndDoVoipCallForHotelHeaders{};
  return checkAndDoVoipCallForHotelWithOptions(request, headers, runtime);
}

model CheckAuthCodeBindForExtHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model CheckAuthCodeBindForExtRequest {
  authCode?: string(name='AuthCode', description='This parameter is required.', example='Aexfgc'),
  encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
  encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1***2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model CheckAuthCodeBindForExtShrinkRequest {
  authCode?: string(name='AuthCode', description='This parameter is required.', example='Aexfgc'),
  encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
  encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model CheckAuthCodeBindForExtResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: {
    deviceOpenInfo?: {
      id?: string(name='Id', example='A963*0158'),
      idType?: string(name='IdType', description='DEVICE_ID', example='DEVICE_ID'),
    }(name='DeviceOpenInfo'),
    userOpenInfo?: {
      id?: string(name='Id', example='0963*0158'),
      idType?: string(name='IdType', description='USER_ID', example='USER_ID'),
    }(name='UserOpenInfo'),
  }(name='Result'),
}

model CheckAuthCodeBindForExtResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckAuthCodeBindForExtResponseBody(name='body'),
}

/**
 * @summary 轮询激活绑定结果
 *
 * @param tmpReq CheckAuthCodeBindForExtRequest
 * @param headers CheckAuthCodeBindForExtHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckAuthCodeBindForExtResponse
 */
async function checkAuthCodeBindForExtWithOptions(tmpReq: CheckAuthCodeBindForExtRequest, headers: CheckAuthCodeBindForExtHeaders, runtime: Util.RuntimeOptions): CheckAuthCodeBindForExtResponse {
  Util.validateModel(tmpReq);
  var request = new CheckAuthCodeBindForExtShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.authCode)) {
    query['AuthCode'] = request.authCode;
  }
  if (!Util.isUnset(request.encodeKey)) {
    query['EncodeKey'] = request.encodeKey;
  }
  if (!Util.isUnset(request.encodeType)) {
    query['EncodeType'] = request.encodeType;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CheckAuthCodeBindForExt',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/checkAuthCodeBindForExt`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 轮询激活绑定结果
 *
 * @param request CheckAuthCodeBindForExtRequest
 * @return CheckAuthCodeBindForExtResponse
 */
async function checkAuthCodeBindForExt(request: CheckAuthCodeBindForExtRequest): CheckAuthCodeBindForExtResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new CheckAuthCodeBindForExtHeaders{};
  return checkAuthCodeBindForExtWithOptions(request, headers, runtime);
}

model CloudPlayerHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model CloudPlayerRequest {
  curPlayIndex?: int32(name='CurPlayIndex', description='This parameter is required.', example='1'),
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='1234'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo', description='This parameter is required.'),
  playMode?: string(name='PlayMode', description='This parameter is required.', example='Normal'),
  songId?: string(name='SongId', example='123'),
  songIdList?: [ string ](name='SongIdList', description='This parameter is required.'),
  source?: string(name='Source', description='This parameter is required.', example='KG'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='1234'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo', description='This parameter is required.'),
}

model CloudPlayerShrinkRequest {
  curPlayIndex?: int32(name='CurPlayIndex', description='This parameter is required.', example='1'),
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  playMode?: string(name='PlayMode', description='This parameter is required.', example='Normal'),
  songId?: string(name='SongId', example='123'),
  songIdListShrink?: string(name='SongIdList', description='This parameter is required.'),
  source?: string(name='Source', description='This parameter is required.', example='KG'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model CloudPlayerResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', description='Id of the request', example='B7D82DB0-DD59-5756-AC62-871C9D7DBC36'),
  result?: boolean(name='Result', example='true'),
}

model CloudPlayerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CloudPlayerResponseBody(name='body'),
}

/**
 * @summary 云播放器：对外
 *
 * @param tmpReq CloudPlayerRequest
 * @param headers CloudPlayerHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return CloudPlayerResponse
 */
async function cloudPlayerWithOptions(tmpReq: CloudPlayerRequest, headers: CloudPlayerHeaders, runtime: Util.RuntimeOptions): CloudPlayerResponse {
  Util.validateModel(tmpReq);
  var request = new CloudPlayerShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.songIdList)) {
    request.songIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.songIdList, 'SongIdList', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.curPlayIndex)) {
    query['CurPlayIndex'] = request.curPlayIndex;
  }
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.playMode)) {
    query['PlayMode'] = request.playMode;
  }
  if (!Util.isUnset(request.songId)) {
    query['SongId'] = request.songId;
  }
  if (!Util.isUnset(request.songIdListShrink)) {
    query['SongIdList'] = request.songIdListShrink;
  }
  if (!Util.isUnset(request.source)) {
    query['Source'] = request.source;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CloudPlayer',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/cloud/player`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 云播放器：对外
 *
 * @param request CloudPlayerRequest
 * @return CloudPlayerResponse
 */
async function cloudPlayer(request: CloudPlayerRequest): CloudPlayerResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new CloudPlayerHeaders{};
  return cloudPlayerWithOptions(request, headers, runtime);
}

model CreateAlarmHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model CreateAlarmRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    musicInfo?: {
      musicId?: long(name='MusicId', description='This parameter is required.', example='1'),
      musicName?: string(name='MusicName', description='This parameter is required.'),
      musicType?: long(name='MusicType', description='This parameter is required.', example='1'),
      musicTypeName?: string(name='MusicTypeName', description='This parameter is required.'),
      musicUrl?: string(name='MusicUrl', example='http://xx'),
    }(name='MusicInfo', description='This parameter is required.'),
    scheduleInfo?: {
      once?: {
        day?: int32(name='Day', example='1'),
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
        month?: int32(name='Month', example='8'),
        year?: int32(name='Year', example='2022'),
      }(name='Once'),
      statutoryWorkingDay?: {
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
      }(name='StatutoryWorkingDay'),
      type?: string(name='Type', description='This parameter is required.', example='ONCE'),
      weekly?: {
        daysOfWeek?: [ int32 ](name='DaysOfWeek'),
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
      }(name='Weekly'),
    }(name='ScheduleInfo', description='This parameter is required.'),
    volume?: int32(name='Volume', example='40'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model CreateAlarmShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model CreateAlarmResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: long(name='Result', example='1234567'),
}

model CreateAlarmResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAlarmResponseBody(name='body'),
}

/**
 * @summary 创建闹钟
 *
 * @param tmpReq CreateAlarmRequest
 * @param headers CreateAlarmHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAlarmResponse
 */
async function createAlarmWithOptions(tmpReq: CreateAlarmRequest, headers: CreateAlarmHeaders, runtime: Util.RuntimeOptions): CreateAlarmResponse {
  Util.validateModel(tmpReq);
  var request = new CreateAlarmShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAlarm',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/createAlarm`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建闹钟
 *
 * @param request CreateAlarmRequest
 * @return CreateAlarmResponse
 */
async function createAlarm(request: CreateAlarmRequest): CreateAlarmResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new CreateAlarmHeaders{};
  return createAlarmWithOptions(request, headers, runtime);
}

model CreatePlayingListHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model CreatePlayingListRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openCreatePlayingListRequest?: {
    contentList?: [ 
      {
        rawId?: string(name='RawId', description='This parameter is required.', example='12345'),
        source?: string(name='Source', description='This parameter is required.', example='xiami'),
      }
    ](name='ContentList', description='This parameter is required.'),
    contentType?: string(name='ContentType', description='This parameter is required.', example='content'),
    extendInfo?: map[string]any(name='ExtendInfo'),
    index?: int32(name='Index', example='0'),
    needAlbumContinued?: boolean(name='NeedAlbumContinued', example='true'),
    playFrom?: string(name='PlayFrom', example='default'),
    playMode?: string(name='PlayMode', example='Repeat'),
  }(name='OpenCreatePlayingListRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model CreatePlayingListShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openCreatePlayingListRequestShrink?: string(name='OpenCreatePlayingListRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model CreatePlayingListResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: {
    albumName?: string(name='AlbumName'),
    albumRawId?: string(name='AlbumRawId', example='260744'),
    audioLength?: int32(name='AudioLength', example='190'),
    copyright?: int32(name='Copyright', example='0'),
    cover?: {
      canResize?: boolean(name='CanResize', example='false'),
      img?: string(name='Img', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      large?: string(name='Large', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      mediam?: string(name='Mediam', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      medium?: string(name='Medium', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      small?: string(name='Small', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
    }(name='Cover'),
    defaultPlayOrder?: int32(name='DefaultPlayOrder', example='1'),
    itemUrl?: string(name='ItemUrl', example='https://openaudio.cos.tx.xmcdn.com/storages/587f-audiofreehighqps/15/CE/GKwRIJIGnb11ABc6SwF59DNb.mp3'),
    liked?: boolean(name='Liked', example='false'),
    lyricUrl?: string(name='LyricUrl', example='https://aicontent.alibabausercontent.com/lyric/thirdsource/6f4c8408073db134b0d097c122b5a1a1.lrc'),
    playMode?: string(name='PlayMode', example='Repeat'),
    pos?: int32(name='Pos', example='0'),
    progress?: int32(name='Progress', example='0'),
    rawId?: string(name='RawId', example='550144364'),
    singer?: string(name='Singer'),
    source?: string(name='Source', example='ximalayav2'),
    title?: string(name='Title'),
    type?: string(name='Type', example='story'),
    valid?: string(name='Valid', example='VALID'),
  }(name='Result'),
  success?: string(name='Success', example='true'),
}

model CreatePlayingListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePlayingListResponseBody(name='body'),
}

/**
 * @summary 播放列表创建
 *
 * @param tmpReq CreatePlayingListRequest
 * @param headers CreatePlayingListHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePlayingListResponse
 */
async function createPlayingListWithOptions(tmpReq: CreatePlayingListRequest, headers: CreatePlayingListHeaders, runtime: Util.RuntimeOptions): CreatePlayingListResponse {
  Util.validateModel(tmpReq);
  var request = new CreatePlayingListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openCreatePlayingListRequest)) {
    request.openCreatePlayingListRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openCreatePlayingListRequest, 'OpenCreatePlayingListRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openCreatePlayingListRequestShrink)) {
    body['OpenCreatePlayingListRequest'] = request.openCreatePlayingListRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePlayingList',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/CreatePlayingList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 播放列表创建
 *
 * @param request CreatePlayingListRequest
 * @return CreatePlayingListResponse
 */
async function createPlayingList(request: CreatePlayingListRequest): CreatePlayingListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new CreatePlayingListHeaders{};
  return createPlayingListWithOptions(request, headers, runtime);
}

model CreateScheduleTaskHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model CreateScheduleTaskRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='DAFE****ce3ej='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    actionDTOs?: [ 
      {
        customAction?: map[string]any(name='customAction', example='{"k1":"v1","k2":{"key":1}}'),
      }
    ](name='ActionDTOs', description='This parameter is required.'),
    idempotentId?: string(name='IdempotentId', example='1'),
    scheduleDTO?: {
      once?: {
        day?: int32(name='Day', example='26'),
        hour?: int32(name='Hour', example='12'),
        minute?: int32(name='Minute', example='30'),
        month?: int32(name='Month', example='7'),
        year?: int32(name='Year', example='2022'),
      }(name='Once'),
      scheduleEndTime?: long(name='ScheduleEndTime', description='This parameter is required.', example='1661589255000'),
      scheduleStartTime?: long(name='ScheduleStartTime', description='This parameter is required.', example='1656318855000'),
      scheduleType?: string(name='ScheduleType', description='This parameter is required.', example='ONCE'),
      statutoryWorkingDay?: {
        hours?: [ int32 ](name='Hours'),
        minutes?: [ int32 ](name='Minutes'),
      }(name='StatutoryWorkingDay'),
      weekly?: {
        daysOfWeek?: [ int32 ](name='DaysOfWeek'),
        hours?: [ int32 ](name='Hours'),
        minutes?: [ int32 ](name='Minutes'),
      }(name='Weekly'),
    }(name='ScheduleDTO', description='This parameter is required.'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='HOFF****my7Iw='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model CreateScheduleTaskShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model CreateScheduleTaskResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='F7E2****B7C94'),
  result?: long(name='Result', example='1234567'),
}

model CreateScheduleTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScheduleTaskResponseBody(name='body'),
}

/**
 * @summary 创建定时任务
 *
 * @param tmpReq CreateScheduleTaskRequest
 * @param headers CreateScheduleTaskHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScheduleTaskResponse
 */
async function createScheduleTaskWithOptions(tmpReq: CreateScheduleTaskRequest, headers: CreateScheduleTaskHeaders, runtime: Util.RuntimeOptions): CreateScheduleTaskResponse {
  Util.validateModel(tmpReq);
  var request = new CreateScheduleTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateScheduleTask',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/CreateScheduleTask`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建定时任务
 *
 * @param request CreateScheduleTaskRequest
 * @return CreateScheduleTaskResponse
 */
async function createScheduleTask(request: CreateScheduleTaskRequest): CreateScheduleTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new CreateScheduleTaskHeaders{};
  return createScheduleTaskWithOptions(request, headers, runtime);
}

model DeleteAlarmsHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model DeleteAlarmsRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    alarmIds?: [ long ](name='AlarmIds', description='This parameter is required.'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model DeleteAlarmsShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model DeleteAlarmsResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: boolean(name='Result', example='true'),
}

model DeleteAlarmsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAlarmsResponseBody(name='body'),
}

/**
 * @summary 闹钟批量删除
 *
 * @param tmpReq DeleteAlarmsRequest
 * @param headers DeleteAlarmsHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAlarmsResponse
 */
async function deleteAlarmsWithOptions(tmpReq: DeleteAlarmsRequest, headers: DeleteAlarmsHeaders, runtime: Util.RuntimeOptions): DeleteAlarmsResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteAlarmsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAlarms',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/deleteAlarms`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 闹钟批量删除
 *
 * @param request DeleteAlarmsRequest
 * @return DeleteAlarmsResponse
 */
async function deleteAlarms(request: DeleteAlarmsRequest): DeleteAlarmsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new DeleteAlarmsHeaders{};
  return deleteAlarmsWithOptions(request, headers, runtime);
}

model DeleteScheduleTaskHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model DeleteScheduleTaskRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='DAFE****ce3ej='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    id?: long(name='Id', description='This parameter is required.', example='1234567'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='HOFF****my7Iw='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model DeleteScheduleTaskShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model DeleteScheduleTaskResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='F7E2****B7C94'),
  result?: boolean(name='Result', example='true'),
}

model DeleteScheduleTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScheduleTaskResponseBody(name='body'),
}

/**
 * @summary 删除定时任务
 *
 * @param tmpReq DeleteScheduleTaskRequest
 * @param headers DeleteScheduleTaskHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScheduleTaskResponse
 */
async function deleteScheduleTaskWithOptions(tmpReq: DeleteScheduleTaskRequest, headers: DeleteScheduleTaskHeaders, runtime: Util.RuntimeOptions): DeleteScheduleTaskResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteScheduleTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScheduleTask',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/DeleteScheduleTask`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除定时任务
 *
 * @param request DeleteScheduleTaskRequest
 * @return DeleteScheduleTaskResponse
 */
async function deleteScheduleTask(request: DeleteScheduleTaskRequest): DeleteScheduleTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new DeleteScheduleTaskHeaders{};
  return deleteScheduleTaskWithOptions(request, headers, runtime);
}

model DeleteSubHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model DeleteSubRequest {
  subId?: long(name='SubId', description='This parameter is required.', example='81'),
}

model DeleteSubResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0AA6C15C-FD61-1E32-9881-480CC6F35A70'),
  result?: boolean(name='Result', example='true'),
}

model DeleteSubResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteSubResponseBody(name='body'),
}

/**
 * @summary 删除订阅
 *
 * @param request DeleteSubRequest
 * @param headers DeleteSubHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteSubResponse
 */
async function deleteSubWithOptions(request: DeleteSubRequest, headers: DeleteSubHeaders, runtime: Util.RuntimeOptions): DeleteSubResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.subId)) {
    query['SubId'] = request.subId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteSub',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/deleteSub`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除订阅
 *
 * @param request DeleteSubRequest
 * @return DeleteSubResponse
 */
async function deleteSub(request: DeleteSubRequest): DeleteSubResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new DeleteSubHeaders{};
  return deleteSubWithOptions(request, headers, runtime);
}

model DeviceControlHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model DeviceControlRequest {
  controlRequest?: {
    muted?: boolean(name='Muted', example='false'),
    volume?: int32(name='Volume', example='10'),
  }(name='ControlRequest'),
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1*****2'),
  }(name='DeviceInfo', description='This parameter is required.'),
}

model DeviceControlShrinkRequest {
  controlRequestShrink?: string(name='ControlRequest'),
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
}

model DeviceControlResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: boolean(name='Result'),
}

model DeviceControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeviceControlResponseBody(name='body'),
}

/**
 * @summary 设备控制
 *
 * @param tmpReq DeviceControlRequest
 * @param headers DeviceControlHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeviceControlResponse
 */
async function deviceControlWithOptions(tmpReq: DeviceControlRequest, headers: DeviceControlHeaders, runtime: Util.RuntimeOptions): DeviceControlResponse {
  Util.validateModel(tmpReq);
  var request = new DeviceControlShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.controlRequest)) {
    request.controlRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.controlRequest, 'ControlRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.controlRequestShrink)) {
    body['ControlRequest'] = request.controlRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeviceControl',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/control`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 设备控制
 *
 * @param request DeviceControlRequest
 * @return DeviceControlResponse
 */
async function deviceControl(request: DeviceControlRequest): DeviceControlResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new DeviceControlHeaders{};
  return deviceControlWithOptions(request, headers, runtime);
}

model EcologyOpennessAuthenticateHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model EcologyOpennessAuthenticateRequest {
  encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12*****'),
  encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
  loginStateAccessToken?: string(name='LoginStateAccessToken', description='This parameter is required.', example='d15aa*****ee'),
}

model EcologyOpennessAuthenticateResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73****9-175A-1324-8202-9FAAB*****A'),
  result?: {
    encodeKey?: string(name='EncodeKey', example='12****7'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    sceneCode?: string(name='SceneCode', example='******'),
    thirdUserIdentifier?: string(name='ThirdUserIdentifier', example='******'),
    thirdUserType?: string(name='ThirdUserType', example='******'),
    userOpenId?: string(name='UserOpenId', example='o****RnNAW/smBNX9By7Zlc3J7iQUXPiUj/6OizU+ifLSzn1vpQL9ZgSp22u7hsxj0UZ2i6urbv9HQ=='),
  }(name='Result'),
  success?: boolean(name='Success', example='true'),
}

model EcologyOpennessAuthenticateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EcologyOpennessAuthenticateResponseBody(name='body'),
}

/**
 * @summary 生态开放鉴权
 *
 * @param request EcologyOpennessAuthenticateRequest
 * @param headers EcologyOpennessAuthenticateHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return EcologyOpennessAuthenticateResponse
 */
async function ecologyOpennessAuthenticateWithOptions(request: EcologyOpennessAuthenticateRequest, headers: EcologyOpennessAuthenticateHeaders, runtime: Util.RuntimeOptions): EcologyOpennessAuthenticateResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.encodeKey)) {
    body['EncodeKey'] = request.encodeKey;
  }
  if (!Util.isUnset(request.encodeType)) {
    body['EncodeType'] = request.encodeType;
  }
  if (!Util.isUnset(request.loginStateAccessToken)) {
    body['LoginStateAccessToken'] = request.loginStateAccessToken;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'EcologyOpennessAuthenticate',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ecologyOpennessAuthenticate`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 生态开放鉴权
 *
 * @param request EcologyOpennessAuthenticateRequest
 * @return EcologyOpennessAuthenticateResponse
 */
async function ecologyOpennessAuthenticate(request: EcologyOpennessAuthenticateRequest): EcologyOpennessAuthenticateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new EcologyOpennessAuthenticateHeaders{};
  return ecologyOpennessAuthenticateWithOptions(request, headers, runtime);
}

model EcologyOpennessSendVerificationCodeHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model EcologyOpennessSendVerificationCodeRequest {
  phoneNumber?: string(name='PhoneNumber', description='This parameter is required.', example='18612345678'),
  region?: string(name='Region', description='This parameter is required.', example='+86'),
  sessionId?: string(name='SessionId', description='This parameter is required.', example='dbe2eb4458302b9246c6da17fbc95f4b'),
}

model EcologyOpennessSendVerificationCodeResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    expireIn?: int32(name='ExpireIn', example='900'),
    repeatInterval?: int32(name='RepeatInterval', example='60'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model EcologyOpennessSendVerificationCodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EcologyOpennessSendVerificationCodeResponseBody(name='body'),
}

/**
 * @summary 生态开放发送短信验证码
 *
 * @param request EcologyOpennessSendVerificationCodeRequest
 * @param headers EcologyOpennessSendVerificationCodeHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return EcologyOpennessSendVerificationCodeResponse
 */
async function ecologyOpennessSendVerificationCodeWithOptions(request: EcologyOpennessSendVerificationCodeRequest, headers: EcologyOpennessSendVerificationCodeHeaders, runtime: Util.RuntimeOptions): EcologyOpennessSendVerificationCodeResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.phoneNumber)) {
    body['PhoneNumber'] = request.phoneNumber;
  }
  if (!Util.isUnset(request.region)) {
    body['Region'] = request.region;
  }
  if (!Util.isUnset(request.sessionId)) {
    body['SessionId'] = request.sessionId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'EcologyOpennessSendVerificationCode',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ecologyOpennessSendVerificationCode`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 生态开放发送短信验证码
 *
 * @param request EcologyOpennessSendVerificationCodeRequest
 * @return EcologyOpennessSendVerificationCodeResponse
 */
async function ecologyOpennessSendVerificationCode(request: EcologyOpennessSendVerificationCodeRequest): EcologyOpennessSendVerificationCodeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new EcologyOpennessSendVerificationCodeHeaders{};
  return ecologyOpennessSendVerificationCodeWithOptions(request, headers, runtime);
}

model FindUserlistToAuthLoginWithPhoneNumberHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model FindUserlistToAuthLoginWithPhoneNumberRequest {
  code?: string(name='Code', description='This parameter is required.', example='123456'),
  phoneNumber?: string(name='PhoneNumber', description='This parameter is required.', example='18612345678'),
  region?: string(name='Region', description='This parameter is required.', example='+86'),
  sessionId?: string(name='SessionId', description='This parameter is required.', example='dbe2eb4458302b9246c6da17fbc95f4b'),
}

model FindUserlistToAuthLoginWithPhoneNumberResponseBody = {
  code?: int32(name='Code', example='200'),
  dataObj?: {
    sessionId?: string(name='SessionId', example='dbe2eb4458302b9246c6da17fbc95f4b'),
  }(name='DataObj'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    userListToAuthLogin?: [ 
      {
        avatar?: string(name='Avatar', example='https://xxx'),
        encryptedUserIdentifier?: string(name='EncryptedUserIdentifier', example='KsVgypxAipf+xNECMZV2ONMcheqiIoEGFvgx+T8s1oV6/euTK9+ImYvLVPsSqFDh'),
        findingType?: string(name='FindingType', example='PHONE_NUMBER_BINDING_WITH_ALIGENIE：phoneNumber'),
        nickname?: string(name='Nickname', example='XXX'),
        userType?: string(name='UserType', example='ALIGENIE'),
      }
    ](name='UserListToAuthLogin'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model FindUserlistToAuthLoginWithPhoneNumberResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: FindUserlistToAuthLoginWithPhoneNumberResponseBody(name='body'),
}

/**
 * @summary 通过手机号寻找可授权登录的账号列表
 *
 * @param request FindUserlistToAuthLoginWithPhoneNumberRequest
 * @param headers FindUserlistToAuthLoginWithPhoneNumberHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return FindUserlistToAuthLoginWithPhoneNumberResponse
 */
async function findUserlistToAuthLoginWithPhoneNumberWithOptions(request: FindUserlistToAuthLoginWithPhoneNumberRequest, headers: FindUserlistToAuthLoginWithPhoneNumberHeaders, runtime: Util.RuntimeOptions): FindUserlistToAuthLoginWithPhoneNumberResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.code)) {
    query['Code'] = request.code;
  }
  if (!Util.isUnset(request.phoneNumber)) {
    query['PhoneNumber'] = request.phoneNumber;
  }
  if (!Util.isUnset(request.region)) {
    query['Region'] = request.region;
  }
  if (!Util.isUnset(request.sessionId)) {
    query['SessionId'] = request.sessionId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'FindUserlistToAuthLoginWithPhoneNumber',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/findUserlistToAuthLoginWithPhoneNumber`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过手机号寻找可授权登录的账号列表
 *
 * @param request FindUserlistToAuthLoginWithPhoneNumberRequest
 * @return FindUserlistToAuthLoginWithPhoneNumberResponse
 */
async function findUserlistToAuthLoginWithPhoneNumber(request: FindUserlistToAuthLoginWithPhoneNumberRequest): FindUserlistToAuthLoginWithPhoneNumberResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new FindUserlistToAuthLoginWithPhoneNumberHeaders{};
  return findUserlistToAuthLoginWithPhoneNumberWithOptions(request, headers, runtime);
}

model GetAlarmHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetAlarmRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    alarmId?: long(name='AlarmId', description='This parameter is required.', example='1234567'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model GetAlarmShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model GetAlarmResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: {
    alarmId?: long(name='AlarmId', example='1234567'),
    musicInfo?: {
      musicId?: long(name='MusicId', example='1'),
      musicName?: string(name='MusicName'),
      musicType?: long(name='MusicType', example='1'),
      musicTypeName?: string(name='MusicTypeName'),
      musicUrl?: string(name='MusicUrl', example='http://xx'),
    }(name='MusicInfo'),
    scheduleInfo?: {
      once?: {
        day?: int32(name='Day', example='29'),
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
        month?: int32(name='Month', example='7'),
        year?: int32(name='Year', example='2022'),
      }(name='Once'),
      statutoryWorkingDay?: {
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
      }(name='StatutoryWorkingDay'),
      type?: string(name='Type', example='ONCE'),
      weekly?: {
        daysOfWeek?: [ int32 ](name='DaysOfWeek'),
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
      }(name='Weekly'),
    }(name='ScheduleInfo'),
    scheduleTypeDesc?: string(name='ScheduleTypeDesc'),
    status?: int32(name='Status', example='0'),
    triggerDateDesc?: string(name='TriggerDateDesc', example='2022-07-29'),
    triggerTimeDesc?: string(name='TriggerTimeDesc', example='10:00'),
    volume?: int32(name='Volume', example='40'),
  }(name='Result'),
}

model GetAlarmResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAlarmResponseBody(name='body'),
}

/**
 * @summary 获取单个闹钟
 *
 * @param tmpReq GetAlarmRequest
 * @param headers GetAlarmHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAlarmResponse
 */
async function getAlarmWithOptions(tmpReq: GetAlarmRequest, headers: GetAlarmHeaders, runtime: Util.RuntimeOptions): GetAlarmResponse {
  Util.validateModel(tmpReq);
  var request = new GetAlarmShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetAlarm',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getAlarm`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取单个闹钟
 *
 * @param request GetAlarmRequest
 * @return GetAlarmResponse
 */
async function getAlarm(request: GetAlarmRequest): GetAlarmResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetAlarmHeaders{};
  return getAlarmWithOptions(request, headers, runtime);
}

model GetAlbumHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetAlbumRequest {
  id?: long(name='Id', description='This parameter is required.', example='12343'),
  type?: string(name='Type', description='This parameter is required.', example='song'),
}

model GetAlbumResponseBody = {
  code?: int32(name='Code', example='200'),
  requestId?: string(name='RequestId', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: {
    alias?: [ string ](name='Alias'),
    audition?: boolean(name='Audition', example='false'),
    authors?: [ 
      {
        authorTypes?: [ string ](name='AuthorTypes'),
        gender?: string(name='Gender', example='MALE'),
        id?: long(name='Id', example='13123'),
        online?: boolean(name='Online', example='false'),
        source?: string(name='Source', example='qignting'),
        title?: string(name='Title'),
      }
    ](name='Authors'),
    category?: string(name='Category', example='audio'),
    charge?: boolean(name='Charge', example='false'),
    commCateId?: long(name='CommCateId', example='80012017'),
    cover?: {
      canResize?: boolean(name='CanResize', example='false'),
      img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
    }(name='Cover'),
    description?: string(name='Description'),
    finished?: string(name='Finished', example='FINISHED'),
    hotScore?: double(name='HotScore', example='10'),
    id?: long(name='Id', example='1231231'),
    itemType?: string(name='ItemType', example='ALBUM'),
    rawId?: string(name='RawId', example='23242'),
    source?: string(name='Source', example='qignting'),
    title?: string(name='Title'),
    totalEpisode?: int32(name='TotalEpisode', example='12'),
    type?: string(name='Type', example='program'),
    valid?: string(name='Valid', example='VALID'),
  }(name='Result'),
}

model GetAlbumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAlbumResponseBody(name='body'),
}

/**
 * @summary 根据id获取专辑信息
 *
 * @param request GetAlbumRequest
 * @param headers GetAlbumHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAlbumResponse
 */
async function getAlbumWithOptions(request: GetAlbumRequest, headers: GetAlbumHeaders, runtime: Util.RuntimeOptions): GetAlbumResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAlbum',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetAlbum`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据id获取专辑信息
 *
 * @param request GetAlbumRequest
 * @return GetAlbumResponse
 */
async function getAlbum(request: GetAlbumRequest): GetAlbumResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetAlbumHeaders{};
  return getAlbumWithOptions(request, headers, runtime);
}

model GetAlbumDetailByIdHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetAlbumDetailByIdRequest {
  albumId?: string(name='AlbumId', example='51999575'),
}

model GetAlbumDetailByIdResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='A0B7CACD-485B-14E2-854F-39EACB09E45B'),
  result?: {
    albumContentList?: [ 
      {
        duration?: string(name='Duration', example='3分24秒'),
        id?: string(name='Id', example='468009044'),
        orderIndex?: string(name='OrderIndex', example='1000'),
        title?: string(name='Title', example='001为什么肚子饿时会咕咕叫'),
      }
    ](name='AlbumContentList'),
    albumCoverUrl?: string(name='AlbumCoverUrl', example='https://ailabs.alibabausercontent.com/images/8838/1600839452498.jpg'),
    albumDescription?: string(name='AlbumDescription', example='每次一个百科知识或者故事\\n丰富孩子的视野，拓展眼界和知识面，培养和孩子的探究能力和好奇心\\n\\n'),
    albumId?: string(name='AlbumId', example='51999575'),
    albumTitle?: string(name='AlbumTitle', example='小科学家探索'),
  }(name='Result'),
}

model GetAlbumDetailByIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAlbumDetailByIdResponseBody(name='body'),
}

/**
 * @summary 获取专辑数据
 *
 * @param request GetAlbumDetailByIdRequest
 * @param headers GetAlbumDetailByIdHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAlbumDetailByIdResponse
 */
async function getAlbumDetailByIdWithOptions(request: GetAlbumDetailByIdRequest, headers: GetAlbumDetailByIdHeaders, runtime: Util.RuntimeOptions): GetAlbumDetailByIdResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.albumId)) {
    query['AlbumId'] = request.albumId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAlbumDetailById',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getAlbumDetailById`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取专辑数据
 *
 * @param request GetAlbumDetailByIdRequest
 * @return GetAlbumDetailByIdResponse
 */
async function getAlbumDetailById(request: GetAlbumDetailByIdRequest): GetAlbumDetailByIdResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetAlbumDetailByIdHeaders{};
  return getAlbumDetailByIdWithOptions(request, headers, runtime);
}

model GetAligenieUserInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetAligenieUserInfoRequest {
  loginStateAccessToken?: string(name='LoginStateAccessToken', description='This parameter is required.', example='99ce8a70c23a94f8569e1a525bef6e85'),
}

model GetAligenieUserInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: {
    aligenieNickname?: string(name='AligenieNickname', example='XXX'),
    avatar?: string(name='Avatar', example='http://img.alicdn.com/xxx.jpg'),
    deletable?: boolean(name='Deletable'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model GetAligenieUserInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAligenieUserInfoResponseBody(name='body'),
}

/**
 * @summary 获取三方绑定的精灵账号信息
 *
 * @param request GetAligenieUserInfoRequest
 * @param headers GetAligenieUserInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAligenieUserInfoResponse
 */
async function getAligenieUserInfoWithOptions(request: GetAligenieUserInfoRequest, headers: GetAligenieUserInfoHeaders, runtime: Util.RuntimeOptions): GetAligenieUserInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.loginStateAccessToken)) {
    query['LoginStateAccessToken'] = request.loginStateAccessToken;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAligenieUserInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getAligenieUserInfo`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取三方绑定的精灵账号信息
 *
 * @param request GetAligenieUserInfoRequest
 * @return GetAligenieUserInfoResponse
 */
async function getAligenieUserInfo(request: GetAligenieUserInfoRequest): GetAligenieUserInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetAligenieUserInfoHeaders{};
  return getAligenieUserInfoWithOptions(request, headers, runtime);
}

model GetCodeEnhanceHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetCodeEnhanceRequest {
  channelInfo?: {
    channel?: string(name='Channel', description='This parameter is required.', example='WeChat、ThirdApp'),
    extInfo?: string(name='ExtInfo', example='{}'),
  }(name='ChannelInfo', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1'),
  }(name='UserInfo', description='This parameter is required.'),
}

model GetCodeEnhanceShrinkRequest {
  channelInfoShrink?: string(name='ChannelInfo', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model GetCodeEnhanceResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: string(name='Result', example='Aexfgc'),
}

model GetCodeEnhanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCodeEnhanceResponseBody(name='body'),
}

/**
 * @summary 获取authCode
 *
 * @param tmpReq GetCodeEnhanceRequest
 * @param headers GetCodeEnhanceHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCodeEnhanceResponse
 */
async function getCodeEnhanceWithOptions(tmpReq: GetCodeEnhanceRequest, headers: GetCodeEnhanceHeaders, runtime: Util.RuntimeOptions): GetCodeEnhanceResponse {
  Util.validateModel(tmpReq);
  var request = new GetCodeEnhanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.channelInfo)) {
    request.channelInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.channelInfo, 'ChannelInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.channelInfoShrink)) {
    query['ChannelInfo'] = request.channelInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCodeEnhance',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getCodeEnhance`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取authCode
 *
 * @param request GetCodeEnhanceRequest
 * @return GetCodeEnhanceResponse
 */
async function getCodeEnhance(request: GetCodeEnhanceRequest): GetCodeEnhanceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetCodeEnhanceHeaders{};
  return getCodeEnhanceWithOptions(request, headers, runtime);
}

model GetContentHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetContentRequest {
  id?: long(name='Id', description='This parameter is required.', example='123123'),
  type?: string(name='Type', description='This parameter is required.', example='song'),
}

model GetContentResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: {
    albumId?: string(name='AlbumId', example='1231'),
    alias?: [ string ](name='Alias'),
    audition?: boolean(name='Audition', example='false'),
    authors?: [ 
      {
        authorTypes?: [ string ](name='AuthorTypes'),
        gender?: string(name='Gender', example='MALE'),
        id?: long(name='Id', example='123123'),
        online?: boolean(name='Online', example='false'),
        source?: string(name='Source', example='qingting'),
        title?: string(name='Title'),
      }
    ](name='Authors'),
    category?: string(name='Category', example='audio'),
    charge?: boolean(name='Charge', example='false'),
    commCateId?: long(name='CommCateId', example='80012017'),
    cover?: {
      canResize?: boolean(name='CanResize', example='false'),
      img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
    }(name='Cover'),
    description?: string(name='Description'),
    duration?: long(name='Duration', example='180'),
    hotScore?: double(name='HotScore'),
    id?: long(name='Id', example='13597709'),
    itemType?: string(name='ItemType', example='ALBUM'),
    lyric?: string(name='Lyric', example='http://1231.lrc'),
    rawId?: string(name='RawId', example='1231231'),
    source?: string(name='Source', example='qingting'),
    styles?: [ string ](name='Styles'),
    title?: string(name='Title'),
    type?: string(name='Type', example='program'),
    valid?: string(name='Valid', example='VALID'),
  }(name='Result'),
}

model GetContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetContentResponseBody(name='body'),
}

/**
 * @summary 按照特定的id获取内容信息
 *
 * @param request GetContentRequest
 * @param headers GetContentHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetContentResponse
 */
async function getContentWithOptions(request: GetContentRequest, headers: GetContentHeaders, runtime: Util.RuntimeOptions): GetContentResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetContent',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetContent`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 按照特定的id获取内容信息
 *
 * @param request GetContentRequest
 * @return GetContentResponse
 */
async function getContent(request: GetContentRequest): GetContentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetContentHeaders{};
  return getContentWithOptions(request, headers, runtime);
}

model GetCurrentPlayingItemHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetCurrentPlayingItemRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model GetCurrentPlayingItemShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model GetCurrentPlayingItemResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: {
    albumName?: string(name='AlbumName'),
    albumRawId?: string(name='AlbumRawId', example='260744'),
    audioLength?: int32(name='AudioLength', example='190'),
    copyright?: int32(name='Copyright', example='0'),
    cover?: {
      canResize?: boolean(name='CanResize', example='false'),
      img?: string(name='Img', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      large?: string(name='Large', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      mediam?: string(name='Mediam', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      medium?: string(name='Medium', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      small?: string(name='Small', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
    }(name='Cover'),
    defaultPlayOrder?: int32(name='DefaultPlayOrder', example='1'),
    itemUrl?: string(name='ItemUrl', example='https://openaudio.cos.tx.xmcdn.com/storages/587f-audiofreehighqps/15/CE/GKwRIJIGnb11ABc6SwF59DNb.mp3'),
    liked?: string(name='Liked', example='false'),
    lyricUrl?: string(name='LyricUrl', example='https://aicontent.alibabausercontent.com/lyric/thirdsource/6f4c8408073db134b0d097c122b5a1a1.lrc'),
    playMode?: string(name='PlayMode', example='Repeat'),
    pos?: int32(name='Pos', example='0'),
    progress?: int32(name='Progress', example='0'),
    rawId?: string(name='RawId', example='550144364'),
    singer?: string(name='Singer'),
    source?: string(name='Source', example='ximalayav2'),
    title?: string(name='Title'),
    type?: string(name='Type', example='story'),
    valid?: string(name='Valid', example='VALID'),
  }(name='Result'),
  success?: string(name='Success', example='true'),
}

model GetCurrentPlayingItemResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCurrentPlayingItemResponseBody(name='body'),
}

/**
 * @summary 获取当前播放项
 *
 * @param tmpReq GetCurrentPlayingItemRequest
 * @param headers GetCurrentPlayingItemHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCurrentPlayingItemResponse
 */
async function getCurrentPlayingItemWithOptions(tmpReq: GetCurrentPlayingItemRequest, headers: GetCurrentPlayingItemHeaders, runtime: Util.RuntimeOptions): GetCurrentPlayingItemResponse {
  Util.validateModel(tmpReq);
  var request = new GetCurrentPlayingItemShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCurrentPlayingItem',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetCurrentPlayingItem`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取当前播放项
 *
 * @param request GetCurrentPlayingItemRequest
 * @return GetCurrentPlayingItemResponse
 */
async function getCurrentPlayingItem(request: GetCurrentPlayingItemRequest): GetCurrentPlayingItemResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetCurrentPlayingItemHeaders{};
  return getCurrentPlayingItemWithOptions(request, headers, runtime);
}

model GetCurrentPlayingListHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetCurrentPlayingListRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openQueryPlayListRequest?: {
    pageNum?: int32(name='PageNum', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='15'),
  }(name='OpenQueryPlayListRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model GetCurrentPlayingListShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openQueryPlayListRequestShrink?: string(name='OpenQueryPlayListRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model GetCurrentPlayingListResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: [ 
    {
      albumName?: string(name='AlbumName'),
      albumRawId?: string(name='AlbumRawId', example='260744'),
      audioLength?: int32(name='AudioLength', example='190'),
      copyright?: int32(name='Copyright', example='0'),
      cover?: {
        canResize?: boolean(name='CanResize', example='false'),
        img?: string(name='Img', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
        large?: string(name='Large', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
        mediam?: string(name='Mediam', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
        medium?: string(name='Medium', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
        small?: string(name='Small', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      }(name='Cover'),
      defaultPlayOrder?: int32(name='DefaultPlayOrder', example='1'),
      itemUrl?: string(name='ItemUrl', example='https://openaudio.cos.tx.xmcdn.com/storages/587f-audiofreehighqps/15/CE/GKwRIJIGnb11ABc6SwF59DNb.mp3'),
      liked?: boolean(name='Liked', example='false'),
      lyricUrl?: string(name='LyricUrl', example='https://aicontent.alibabausercontent.com/lyric/thirdsource/6f4c8408073db134b0d097c122b5a1a1.lrc'),
      playMode?: string(name='PlayMode', example='Normal'),
      pos?: int32(name='Pos', example='0'),
      progress?: int32(name='Progress', example='0'),
      rawId?: string(name='RawId', example='550144364'),
      singer?: string(name='Singer'),
      source?: string(name='Source', example='ximalayav2'),
      title?: string(name='Title'),
      type?: string(name='Type', example='story'),
      valid?: string(name='Valid', example='VALID'),
    }
  ](name='Result'),
  success?: string(name='Success', example='true'),
}

model GetCurrentPlayingListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCurrentPlayingListResponseBody(name='body'),
}

/**
 * @summary 获取当前播放列表
 *
 * @param tmpReq GetCurrentPlayingListRequest
 * @param headers GetCurrentPlayingListHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCurrentPlayingListResponse
 */
async function getCurrentPlayingListWithOptions(tmpReq: GetCurrentPlayingListRequest, headers: GetCurrentPlayingListHeaders, runtime: Util.RuntimeOptions): GetCurrentPlayingListResponse {
  Util.validateModel(tmpReq);
  var request = new GetCurrentPlayingListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openQueryPlayListRequest)) {
    request.openQueryPlayListRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openQueryPlayListRequest, 'OpenQueryPlayListRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openQueryPlayListRequestShrink)) {
    body['OpenQueryPlayListRequest'] = request.openQueryPlayListRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetCurrentPlayingList',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetCurrentPlayingList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取当前播放列表
 *
 * @param request GetCurrentPlayingListRequest
 * @return GetCurrentPlayingListResponse
 */
async function getCurrentPlayingList(request: GetCurrentPlayingListRequest): GetCurrentPlayingListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetCurrentPlayingListHeaders{};
  return getCurrentPlayingListWithOptions(request, headers, runtime);
}

model GetDeviceBasicInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetDeviceBasicInfoRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1'),
  }(name='DeviceInfo', description='This parameter is required.'),
}

model GetDeviceBasicInfoShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
}

model GetDeviceBasicInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: {
    firmwareVersion?: string(name='FirmwareVersion', example='2.0.3'),
    mac?: string(name='Mac', example='b4:xx:xx:xx:65:2b'),
    name?: string(name='Name', example='我的设备'),
    sn?: string(name='Sn', example='1200xxx048'),
  }(name='Result'),
}

model GetDeviceBasicInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceBasicInfoResponseBody(name='body'),
}

/**
 * @summary 获取设备认证信息
 *
 * @param tmpReq GetDeviceBasicInfoRequest
 * @param headers GetDeviceBasicInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceBasicInfoResponse
 */
async function getDeviceBasicInfoWithOptions(tmpReq: GetDeviceBasicInfoRequest, headers: GetDeviceBasicInfoHeaders, runtime: Util.RuntimeOptions): GetDeviceBasicInfoResponse {
  Util.validateModel(tmpReq);
  var request = new GetDeviceBasicInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceBasicInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getDeviceBasicInfo`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备认证信息
 *
 * @param request GetDeviceBasicInfoRequest
 * @return GetDeviceBasicInfoResponse
 */
async function getDeviceBasicInfo(request: GetDeviceBasicInfoRequest): GetDeviceBasicInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetDeviceBasicInfoHeaders{};
  return getDeviceBasicInfoWithOptions(request, headers, runtime);
}

model GetDeviceIdByIdentityHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetDeviceIdByIdentityRequest {
  encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='129****0946'),
  encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
  identityId?: string(name='IdentityId', description='This parameter is required.', example='b4:xx:xx:xx:65:2b'),
  identityType?: string(name='IdentityType', description='This parameter is required.', example='MAC'),
  productKey?: string(name='ProductKey', example='Mm*****XnZ8'),
}

model GetDeviceIdByIdentityResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7DA****A0726E'),
  result?: {
    deviceOpenId?: string(name='DeviceOpenId', example='A963*0158'),
    deviceUnionIds?: [ 
      {
        deviceUnionId?: string(name='DeviceUnionId', example='1553*B0C3'),
        organizationId?: string(name='OrganizationId', example='1**2'),
      }
    ](name='DeviceUnionIds'),
  }(name='Result'),
}

model GetDeviceIdByIdentityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceIdByIdentityResponseBody(name='body'),
}

/**
 * @summary 获取设备信息
 *
 * @param request GetDeviceIdByIdentityRequest
 * @param headers GetDeviceIdByIdentityHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceIdByIdentityResponse
 */
async function getDeviceIdByIdentityWithOptions(request: GetDeviceIdByIdentityRequest, headers: GetDeviceIdByIdentityHeaders, runtime: Util.RuntimeOptions): GetDeviceIdByIdentityResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.encodeKey)) {
    query['EncodeKey'] = request.encodeKey;
  }
  if (!Util.isUnset(request.encodeType)) {
    query['EncodeType'] = request.encodeType;
  }
  if (!Util.isUnset(request.identityId)) {
    query['IdentityId'] = request.identityId;
  }
  if (!Util.isUnset(request.identityType)) {
    query['IdentityType'] = request.identityType;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceIdByIdentity',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getDeviceIdByIdentity`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备信息
 *
 * @param request GetDeviceIdByIdentityRequest
 * @return GetDeviceIdByIdentityResponse
 */
async function getDeviceIdByIdentity(request: GetDeviceIdByIdentityRequest): GetDeviceIdByIdentityResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetDeviceIdByIdentityHeaders{};
  return getDeviceIdByIdentityWithOptions(request, headers, runtime);
}

model GetDeviceSettingHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetDeviceSettingRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12345'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='122'),
  }(name='DeviceInfo'),
  keys?: [ string ](name='Keys', description='This parameter is required.'),
}

model GetDeviceSettingShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo'),
  keysShrink?: string(name='Keys', description='This parameter is required.'),
}

model GetDeviceSettingResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: map[string]any(name='Result'),
}

model GetDeviceSettingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceSettingResponseBody(name='body'),
}

/**
 * @summary 获取设备的用户设置
 *
 * @param tmpReq GetDeviceSettingRequest
 * @param headers GetDeviceSettingHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceSettingResponse
 */
async function getDeviceSettingWithOptions(tmpReq: GetDeviceSettingRequest, headers: GetDeviceSettingHeaders, runtime: Util.RuntimeOptions): GetDeviceSettingResponse {
  Util.validateModel(tmpReq);
  var request = new GetDeviceSettingShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.keys)) {
    request.keysShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.keys, 'Keys', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.keysShrink)) {
    query['Keys'] = request.keysShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceSetting',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getDeviceSetting`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备的用户设置
 *
 * @param request GetDeviceSettingRequest
 * @return GetDeviceSettingResponse
 */
async function getDeviceSetting(request: GetDeviceSettingRequest): GetDeviceSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetDeviceSettingHeaders{};
  return getDeviceSettingWithOptions(request, headers, runtime);
}

model GetDeviceStatusDetailHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetDeviceStatusDetailRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1'),
  }(name='DeviceInfo', description='This parameter is required.'),
  keys?: [ string ](name='Keys', description='This parameter is required.'),
}

model GetDeviceStatusDetailShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  keysShrink?: string(name='Keys', description='This parameter is required.'),
}

model GetDeviceStatusDetailResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: {
    player?: {
      audioAlbum?: string(name='AudioAlbum'),
      audioAnchor?: string(name='AudioAnchor', example='刘德华'),
      audioExt?: string(name='AudioExt', example='""'),
      audioId?: string(name='AudioId', example='123'),
      audioLength?: string(name='AudioLength', example='253'),
      audioName?: string(name='AudioName'),
      audioSource?: string(name='AudioSource', example='xiami'),
      audioUrl?: string(name='AudioUrl', example='https://xxx'),
      format?: string(name='Format', example='mp3'),
      progress?: string(name='Progress', example='30'),
      source?: string(name='Source', example='cloud'),
      status?: string(name='Status', example='pause'),
      timestamp?: string(name='Timestamp'),
    }(name='Player'),
    power?: {
      quantity?: int32(name='Quantity', example='30'),
      status?: string(name='Status'),
    }(name='Power'),
    speaker?: {
      muted?: boolean(name='Muted'),
      volume?: int32(name='Volume', example='10'),
    }(name='Speaker'),
  }(name='Result'),
}

model GetDeviceStatusDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceStatusDetailResponseBody(name='body'),
}

/**
 * @summary 获取设备状态详情
 *
 * @param tmpReq GetDeviceStatusDetailRequest
 * @param headers GetDeviceStatusDetailHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceStatusDetailResponse
 */
async function getDeviceStatusDetailWithOptions(tmpReq: GetDeviceStatusDetailRequest, headers: GetDeviceStatusDetailHeaders, runtime: Util.RuntimeOptions): GetDeviceStatusDetailResponse {
  Util.validateModel(tmpReq);
  var request = new GetDeviceStatusDetailShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.keys)) {
    request.keysShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.keys, 'Keys', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.keysShrink)) {
    query['Keys'] = request.keysShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceStatusDetail',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getDeviceStatusDetail`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备状态详情
 *
 * @param request GetDeviceStatusDetailRequest
 * @return GetDeviceStatusDetailResponse
 */
async function getDeviceStatusDetail(request: GetDeviceStatusDetailRequest): GetDeviceStatusDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetDeviceStatusDetailHeaders{};
  return getDeviceStatusDetailWithOptions(request, headers, runtime);
}

model GetDeviceStatusInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetDeviceStatusInfoRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
}

model GetDeviceStatusInfoShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
}

model GetDeviceStatusInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: {
    online?: int32(name='Online', example='1'),
  }(name='Result'),
}

model GetDeviceStatusInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceStatusInfoResponseBody(name='body'),
}

/**
 * @summary 获取设备状态信息
 *
 * @param tmpReq GetDeviceStatusInfoRequest
 * @param headers GetDeviceStatusInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceStatusInfoResponse
 */
async function getDeviceStatusInfoWithOptions(tmpReq: GetDeviceStatusInfoRequest, headers: GetDeviceStatusInfoHeaders, runtime: Util.RuntimeOptions): GetDeviceStatusInfoResponse {
  Util.validateModel(tmpReq);
  var request = new GetDeviceStatusInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceStatusInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getDeviceStatusInfo`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备状态信息
 *
 * @param request GetDeviceStatusInfoRequest
 * @return GetDeviceStatusInfoResponse
 */
async function getDeviceStatusInfo(request: GetDeviceStatusInfoRequest): GetDeviceStatusInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetDeviceStatusInfoHeaders{};
  return getDeviceStatusInfoWithOptions(request, headers, runtime);
}

model GetDeviceTagHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetDeviceTagRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1'),
  }(name='DeviceInfo', description='This parameter is required.'),
}

model GetDeviceTagShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
}

model GetDeviceTagResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: {
    deviceTags?: map[string]any(name='DeviceTags', example='{       "antest1": "antest1",       "antest": "a"     }'),
  }(name='Result'),
}

model GetDeviceTagResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDeviceTagResponseBody(name='body'),
}

/**
 * @summary 获取设备标签
 *
 * @param tmpReq GetDeviceTagRequest
 * @param headers GetDeviceTagHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDeviceTagResponse
 */
async function getDeviceTagWithOptions(tmpReq: GetDeviceTagRequest, headers: GetDeviceTagHeaders, runtime: Util.RuntimeOptions): GetDeviceTagResponse {
  Util.validateModel(tmpReq);
  var request = new GetDeviceTagShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDeviceTag',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getDeviceTag`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取设备标签
 *
 * @param request GetDeviceTagRequest
 * @return GetDeviceTagResponse
 */
async function getDeviceTag(request: GetDeviceTagRequest): GetDeviceTagResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetDeviceTagHeaders{};
  return getDeviceTagWithOptions(request, headers, runtime);
}

model GetJiangSuTelecomDataHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetJiangSuTelecomDataRequest {
  date?: string(name='Date', example='2024-11-09'),
}

model GetJiangSuTelecomDataResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', description='Id of the request', example='successful'),
  requestId?: string(name='RequestId', example='26C9C3D0-160D-5CDE-BF7A-B3C8D14AA949'),
  result?: {
    ossUrl?: string(name='OssUrl', example='http://jiangsu-telecom.oss-cn-zhangjiakou.aliyuncs.com/jiangsuTelecom/jiangsu_telecom_2024-11-06_data.xls?Expires=1731056700&OSSAccessKeyId=STS.NUqZx6e1HjWYHhYwyDqbRNySp&Signature=wqMK%2Bspo08cg7xDIrzJdgFpZT3U%3D&security-token=CAIS6wJ1q6Ft5B2yfSjIr5bEEcKCiO5p3ZWySk7ok3kRfe1%2Bobz4kjz2IHhMeXJsBuketv42nmxV7%2FoblrN0UIQAT1HPbsZsq84Pq1%2F4O9GY%2FpXrseBZ08VJ18si00SpsvXJasDVEfn%2FGJ70GX2m%2BwZ3xbzlD0bAO3WuLZyOj7N%2Bc90TRXPWRDFaBdBQVGAAwY1gQhm3D%2Fu2NQPwiWf9FVdhvhEG6Vly8qOi2MaRmHG85R%2FYsrZL%2B9uuc8b5P5A0Y8wlAo6PsbYoJvab4kl58ANX8ap6tqtA9Arcs8uVa1sruE3ebrGIrYQ3dFUgPPRnQvIdtrP1nvt5%2FOXS0p%2Fs01NHNOpWXiLTAoe7247OBeiqO8p%2FKeyjZGQuOTooxiRr2elNRQX4VGsiE7JJQhf7CU293KO0YeZxdAR%2FoOMPnzRBdA2yRaA0rjOmtJPBTFOEIL7ymXpDY8bnsxtwDRYu1%2BXrCqUee2Ik3j4vnOf9Je0agAEDuPfR8GLB8uVv4ZCGRRAM5mV3gKCxl07flVk1UPsxMZWBeVwwALT34lxk4x6ivWA7ZXjXdMmIapup%2FEb6UU%2BWhJH1G4sevkw5%2BGb8h8aRjJHBoxB4YLXNTEb5Rk6sVv%2BoCfkljy3%2FWImWGIMigurkAfOIBgUSql8JgFTxQrOHbiAA'),
  }(name='Result'),
}

model GetJiangSuTelecomDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetJiangSuTelecomDataResponseBody(name='body'),
}

/**
 * @summary 江苏电信号百
 *
 * @param request GetJiangSuTelecomDataRequest
 * @param headers GetJiangSuTelecomDataHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetJiangSuTelecomDataResponse
 */
async function getJiangSuTelecomDataWithOptions(request: GetJiangSuTelecomDataRequest, headers: GetJiangSuTelecomDataHeaders, runtime: Util.RuntimeOptions): GetJiangSuTelecomDataResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.date)) {
    query['Date'] = request.date;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetJiangSuTelecomData',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetJiangSuTelecomData`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 江苏电信号百
 *
 * @param request GetJiangSuTelecomDataRequest
 * @return GetJiangSuTelecomDataResponse
 */
async function getJiangSuTelecomData(request: GetJiangSuTelecomDataRequest): GetJiangSuTelecomDataResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetJiangSuTelecomDataHeaders{};
  return getJiangSuTelecomDataWithOptions(request, headers, runtime);
}

model GetScheduleTaskHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetScheduleTaskRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='DAFE****ce3ej='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    id?: long(name='Id', description='This parameter is required.', example='1234567'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='HOFF****my7Iw='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model GetScheduleTaskShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model GetScheduleTaskResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='F7E21065-6C21-1158-A2F9-AEFE5CAB7C94'),
  result?: {
    actionTopicList?: [ 
      {
        customAction?: map[string]any(name='CustomAction', example='{"k1":"v1","k2":{"key":1}}'),
      }
    ](name='ActionTopicList'),
    cron?: string(name='Cron', example='0 10 20 30 6 ? 2022'),
    scheduleEndTime?: string(name='ScheduleEndTime', example='1659169473000'),
    scheduleId?: long(name='ScheduleId', example='1234567'),
    scheduleStartTime?: string(name='ScheduleStartTime', example='1656577473000'),
    scheduleType?: string(name='ScheduleType', example='ONCE'),
  }(name='Result'),
}

model GetScheduleTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetScheduleTaskResponseBody(name='body'),
}

/**
 * @summary 查询定时任务
 *
 * @param tmpReq GetScheduleTaskRequest
 * @param headers GetScheduleTaskHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetScheduleTaskResponse
 */
async function getScheduleTaskWithOptions(tmpReq: GetScheduleTaskRequest, headers: GetScheduleTaskHeaders, runtime: Util.RuntimeOptions): GetScheduleTaskResponse {
  Util.validateModel(tmpReq);
  var request = new GetScheduleTaskShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetScheduleTask',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetScheduleTask`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询定时任务
 *
 * @param request GetScheduleTaskRequest
 * @return GetScheduleTaskResponse
 */
async function getScheduleTask(request: GetScheduleTaskRequest): GetScheduleTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetScheduleTaskHeaders{};
  return getScheduleTaskWithOptions(request, headers, runtime);
}

model GetUnreadMessageCountHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetUnreadMessageCountRequest {
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo'),
}

model GetUnreadMessageCountShrinkRequest {
  userInfoShrink?: string(name='UserInfo'),
}

model GetUnreadMessageCountResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  result?: int32(name='Result', example='10'),
}

model GetUnreadMessageCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUnreadMessageCountResponseBody(name='body'),
}

/**
 * @summary 查询未读留言数量
 *
 * @param tmpReq GetUnreadMessageCountRequest
 * @param headers GetUnreadMessageCountHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUnreadMessageCountResponse
 */
async function getUnreadMessageCountWithOptions(tmpReq: GetUnreadMessageCountRequest, headers: GetUnreadMessageCountHeaders, runtime: Util.RuntimeOptions): GetUnreadMessageCountResponse {
  Util.validateModel(tmpReq);
  var request = new GetUnreadMessageCountShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetUnreadMessageCount',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getUnreadMessageCount`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询未读留言数量
 *
 * @param request GetUnreadMessageCountRequest
 * @return GetUnreadMessageCountResponse
 */
async function getUnreadMessageCount(request: GetUnreadMessageCountRequest): GetUnreadMessageCountResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetUnreadMessageCountHeaders{};
  return getUnreadMessageCountWithOptions(request, headers, runtime);
}

model GetUserByDeviceIdHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetUserByDeviceIdRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
}

model GetUserByDeviceIdShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
}

model GetUserByDeviceIdResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: {
    userOpenId?: string(name='UserOpenId', example='0963*0158'),
    userUnionIds?: [ 
      {
        organizationId?: string(name='OrganizationId', example='1**2'),
        userUnionId?: string(name='UserUnionId', example='1553*B0C3'),
      }
    ](name='UserUnionIds'),
  }(name='Result', example='true'),
}

model GetUserByDeviceIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserByDeviceIdResponseBody(name='body'),
}

/**
 * @summary 查询设备绑定的用户
 *
 * @param tmpReq GetUserByDeviceIdRequest
 * @param headers GetUserByDeviceIdHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserByDeviceIdResponse
 */
async function getUserByDeviceIdWithOptions(tmpReq: GetUserByDeviceIdRequest, headers: GetUserByDeviceIdHeaders, runtime: Util.RuntimeOptions): GetUserByDeviceIdResponse {
  Util.validateModel(tmpReq);
  var request = new GetUserByDeviceIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetUserByDeviceId',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/getUserByDeviceId`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询设备绑定的用户
 *
 * @param request GetUserByDeviceIdRequest
 * @return GetUserByDeviceIdResponse
 */
async function getUserByDeviceId(request: GetUserByDeviceIdRequest): GetUserByDeviceIdResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetUserByDeviceIdHeaders{};
  return getUserByDeviceIdWithOptions(request, headers, runtime);
}

model GetWeatherHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model GetWeatherRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='DAFE****ce3ej='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
  }(name='Payload', nullable=false),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PROJECT_ID'),
    id?: string(name='Id', example='HOFF****my7Iw='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model GetWeatherShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', nullable=false),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model GetWeatherResponseBody = {
  code?: int32(name='Code', description='HttpCode', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='F7E2****B7C94'),
  result?: {
    currentMeteorology?: {
      temperature?: {
        current?: string(name='Current', example='36'),
        currentDesc?: string(name='CurrentDesc'),
        high?: string(name='High', example='37'),
        highDesc?: string(name='HighDesc'),
        logical?: string(name='Logical', example='41'),
        low?: string(name='Low', example='28'),
        lowDesc?: string(name='LowDesc'),
      }(name='Temperature'),
      weather?: {
        code?: string(name='Code', example='000'),
        name?: string(name='Name'),
      }(name='Weather'),
    }(name='CurrentMeteorology'),
  }(name='Result'),
}

model GetWeatherResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetWeatherResponseBody(name='body'),
}

/**
 * @summary 查询天气
 *
 * @param tmpReq GetWeatherRequest
 * @param headers GetWeatherHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetWeatherResponse
 */
async function getWeatherWithOptions(tmpReq: GetWeatherRequest, headers: GetWeatherHeaders, runtime: Util.RuntimeOptions): GetWeatherResponse {
  Util.validateModel(tmpReq);
  var request = new GetWeatherShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetWeather',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/GetWeather`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询天气
 *
 * @param request GetWeatherRequest
 * @return GetWeatherResponse
 */
async function getWeather(request: GetWeatherRequest): GetWeatherResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new GetWeatherHeaders{};
  return getWeatherWithOptions(request, headers, runtime);
}

model IndexControlPlayingListHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model IndexControlPlayingListRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openIndexControlRequest?: {
    extendInfo?: map[string]any(name='ExtendInfo'),
    index?: int32(name='Index', description='This parameter is required.', example='0'),
    needContentContinued?: boolean(name='NeedContentContinued', example='false'),
  }(name='OpenIndexControlRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model IndexControlPlayingListShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openIndexControlRequestShrink?: string(name='OpenIndexControlRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model IndexControlPlayingListResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: {
    albumName?: string(name='AlbumName'),
    albumRawId?: string(name='AlbumRawId', example='260744'),
    audioLength?: int32(name='AudioLength', example='190'),
    copyright?: int32(name='Copyright', example='0'),
    cover?: {
      canResize?: boolean(name='CanResize', example='false'),
      img?: string(name='Img', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      large?: string(name='Large', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      mediam?: string(name='Mediam', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      medium?: string(name='Medium', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      small?: string(name='Small', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
    }(name='Cover'),
    defaultPlayOrder?: int32(name='DefaultPlayOrder', example='1'),
    itemUrl?: string(name='ItemUrl', example='https://openaudio.cos.tx.xmcdn.com/storages/587f-audiofreehighqps/15/CE/GKwRIJIGnb11ABc6SwF59DNb.mp3'),
    liked?: boolean(name='Liked', example='false'),
    lyricUrl?: string(name='LyricUrl', example='https://aicontent.alibabausercontent.com/lyric/thirdsource/6f4c8408073db134b0d097c122b5a1a1.lrc'),
    playMode?: string(name='PlayMode', example='Repeat'),
    pos?: int32(name='Pos', example='0'),
    progress?: int32(name='Progress', example='0'),
    rawId?: string(name='RawId', example='550144364'),
    singer?: string(name='Singer'),
    source?: string(name='Source', example='ximalayav2'),
    title?: string(name='Title'),
    type?: string(name='Type', example='story'),
    valid?: string(name='Valid', example='VALID'),
  }(name='Result'),
  success?: string(name='Success', example='true'),
}

model IndexControlPlayingListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: IndexControlPlayingListResponseBody(name='body'),
}

/**
 * @summary 播放列表点击播放
 *
 * @param tmpReq IndexControlPlayingListRequest
 * @param headers IndexControlPlayingListHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return IndexControlPlayingListResponse
 */
async function indexControlPlayingListWithOptions(tmpReq: IndexControlPlayingListRequest, headers: IndexControlPlayingListHeaders, runtime: Util.RuntimeOptions): IndexControlPlayingListResponse {
  Util.validateModel(tmpReq);
  var request = new IndexControlPlayingListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openIndexControlRequest)) {
    request.openIndexControlRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openIndexControlRequest, 'OpenIndexControlRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openIndexControlRequestShrink)) {
    body['OpenIndexControlRequest'] = request.openIndexControlRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'IndexControlPlayingList',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/IndexControlPlayingList`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 播放列表点击播放
 *
 * @param request IndexControlPlayingListRequest
 * @return IndexControlPlayingListResponse
 */
async function indexControlPlayingList(request: IndexControlPlayingListRequest): IndexControlPlayingListResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new IndexControlPlayingListHeaders{};
  return indexControlPlayingListWithOptions(request, headers, runtime);
}

model InvalidateThirdPartyAppLoginStateHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model InvalidateThirdPartyAppLoginStateRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='com.*.*.*'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ou***lk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  thirdPartyAppId?: string(name='ThirdPartyAppId', description='This parameter is required.', example='com.*.*.*'),
}

model InvalidateThirdPartyAppLoginStateShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  thirdPartyAppId?: string(name='ThirdPartyAppId', description='This parameter is required.', example='com.*.*.*'),
}

model InvalidateThirdPartyAppLoginStateResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', description='Id of the request', example='FAFCD152-4791-5F2F-B0BE-2DC06FD4F05B'),
  success?: boolean(name='Success', example='true'),
}

model InvalidateThirdPartyAppLoginStateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InvalidateThirdPartyAppLoginStateResponseBody(name='body'),
}

/**
 * @summary 失效三方应用登录态
 *
 * @param tmpReq InvalidateThirdPartyAppLoginStateRequest
 * @param headers InvalidateThirdPartyAppLoginStateHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return InvalidateThirdPartyAppLoginStateResponse
 */
async function invalidateThirdPartyAppLoginStateWithOptions(tmpReq: InvalidateThirdPartyAppLoginStateRequest, headers: InvalidateThirdPartyAppLoginStateHeaders, runtime: Util.RuntimeOptions): InvalidateThirdPartyAppLoginStateResponse {
  Util.validateModel(tmpReq);
  var request = new InvalidateThirdPartyAppLoginStateShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.thirdPartyAppId)) {
    body['ThirdPartyAppId'] = request.thirdPartyAppId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'InvalidateThirdPartyAppLoginState',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/invalidateThirdPartyAppLoginState`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 失效三方应用登录态
 *
 * @param request InvalidateThirdPartyAppLoginStateRequest
 * @return InvalidateThirdPartyAppLoginStateResponse
 */
async function invalidateThirdPartyAppLoginState(request: InvalidateThirdPartyAppLoginStateRequest): InvalidateThirdPartyAppLoginStateResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new InvalidateThirdPartyAppLoginStateHeaders{};
  return invalidateThirdPartyAppLoginStateWithOptions(request, headers, runtime);
}

model ListAlarmsHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListAlarmsRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListAlarmsShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListAlarmsResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    model?: [ 
      {
        alarmId?: long(name='AlarmId', example='1234567'),
        musicInfo?: {
          musicId?: long(name='MusicId', example='1'),
          musicName?: string(name='MusicName'),
          musicType?: long(name='MusicType', example='1'),
          musicTypeName?: string(name='MusicTypeName'),
          musicUrl?: string(name='MusicUrl', example='http://xx'),
        }(name='MusicInfo'),
        scheduleInfo?: {
          once?: {
            day?: int32(name='Day', example='29'),
            hour?: int32(name='Hour', example='10'),
            minute?: int32(name='Minute', example='0'),
            month?: int32(name='Month', example='7'),
            year?: int32(name='Year', example='2022'),
          }(name='Once'),
          statutoryWorkingDay?: {
            hour?: int32(name='Hour', example='10'),
            minute?: int32(name='Minute', example='0'),
          }(name='StatutoryWorkingDay'),
          type?: string(name='Type', example='ONCE'),
          weekly?: {
            daysOfWeek?: [ int32 ](name='DaysOfWeek'),
            hour?: int32(name='Hour', example='10'),
            minute?: int32(name='Minute', example='0'),
          }(name='Weekly'),
        }(name='ScheduleInfo'),
        scheduleTypeDesc?: string(name='ScheduleTypeDesc'),
        status?: int32(name='Status', example='0'),
        triggerDateDesc?: string(name='TriggerDateDesc', example='2022-07-29'),
        triggerTimeDesc?: string(name='TriggerTimeDesc', example='10:00'),
        volume?: int32(name='Volume', example='40'),
      }
    ](name='Model'),
    pageCount?: int32(name='PageCount', example='10'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='Result'),
}

model ListAlarmsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAlarmsResponseBody(name='body'),
}

/**
 * @summary 查询闹钟列表
 *
 * @param tmpReq ListAlarmsRequest
 * @param headers ListAlarmsHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAlarmsResponse
 */
async function listAlarmsWithOptions(tmpReq: ListAlarmsRequest, headers: ListAlarmsHeaders, runtime: Util.RuntimeOptions): ListAlarmsResponse {
  Util.validateModel(tmpReq);
  var request = new ListAlarmsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListAlarms',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listAlarm`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询闹钟列表
 *
 * @param request ListAlarmsRequest
 * @return ListAlarmsResponse
 */
async function listAlarms(request: ListAlarmsRequest): ListAlarmsResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListAlarmsHeaders{};
  return listAlarmsWithOptions(request, headers, runtime);
}

model ListAlbumDetailHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListAlbumDetailRequest {
  id?: long(name='Id', description='This parameter is required.', example='121321'),
  pageNum?: int32(name='PageNum', description='This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
}

model ListAlbumDetailResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', description='Id of the request', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: {
    currentPageNum?: long(name='CurrentPageNum', example='1'),
    openDataItemList?: [ 
      {
        alias?: [ string ](name='Alias'),
        audition?: boolean(name='Audition', example='false'),
        authors?: [ 
          {
            authorTypes?: [ string ](name='AuthorTypes'),
            gender?: string(name='Gender', example='MALE'),
            id?: long(name='Id', example='12314'),
            online?: boolean(name='Online', example='false'),
            source?: string(name='Source', example='qingting'),
            title?: string(name='Title'),
          }
        ](name='Authors'),
        category?: string(name='Category', example='audio'),
        charge?: boolean(name='Charge', example='false'),
        commCateId?: long(name='CommCateId', example='80012017'),
        cover?: {
          canResize?: boolean(name='CanResize', example='false'),
          img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
          large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
          medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
          small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        }(name='Cover'),
        description?: string(name='Description'),
        duration?: long(name='Duration', example='180'),
        hotScore?: double(name='HotScore', example='10'),
        id?: long(name='Id', example='1231231'),
        itemType?: string(name='ItemType', example='ALBUM'),
        orderIndex?: long(name='OrderIndex', example='1'),
        rawId?: string(name='RawId', example='12323423'),
        source?: string(name='Source', example='qingting'),
        styles?: [ string ](name='Styles'),
        title?: string(name='Title'),
        type?: string(name='Type', example='program'),
        valid?: string(name='Valid', example='VALID'),
      }
    ](name='OpenDataItemList'),
    pageSize?: long(name='PageSize', example='10'),
    totalSize?: long(name='TotalSize', example='21421'),
  }(name='Result'),
}

model ListAlbumDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAlbumDetailResponseBody(name='body'),
}

/**
 * @summary 获取音乐音频专辑里面的内容列表
 *
 * @param request ListAlbumDetailRequest
 * @param headers ListAlbumDetailHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAlbumDetailResponse
 */
async function listAlbumDetailWithOptions(request: ListAlbumDetailRequest, headers: ListAlbumDetailHeaders, runtime: Util.RuntimeOptions): ListAlbumDetailResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    query['Id'] = request.id;
  }
  if (!Util.isUnset(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAlbumDetail',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListAlbumDetail`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取音乐音频专辑里面的内容列表
 *
 * @param request ListAlbumDetailRequest
 * @return ListAlbumDetailResponse
 */
async function listAlbumDetail(request: ListAlbumDetailRequest): ListAlbumDetailResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListAlbumDetailHeaders{};
  return listAlbumDetailWithOptions(request, headers, runtime);
}

model ListAlbumIsAddedHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListAlbumIsAddedRequest {
  albumIdList?: [ string ](name='AlbumIdList'),
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    id?: string(name='Id'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    id?: string(name='Id'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo'),
}

model ListAlbumIsAddedShrinkRequest {
  albumIdListShrink?: string(name='AlbumIdList'),
  deviceInfoShrink?: string(name='DeviceInfo'),
  userInfoShrink?: string(name='UserInfo'),
}

model ListAlbumIsAddedResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='BCC85E69-5DA6-197E-A8C1-8A1B19CF781B'),
  result?: [ 
    {
      albumId?: string(name='AlbumId', example='51999575'),
      isAdded?: string(name='IsAdded', example='false'),
    }
  ](name='Result'),
}

model ListAlbumIsAddedResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAlbumIsAddedResponseBody(name='body'),
}

/**
 * @summary 专辑是否被订阅
 *
 * @param tmpReq ListAlbumIsAddedRequest
 * @param headers ListAlbumIsAddedHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAlbumIsAddedResponse
 */
async function listAlbumIsAddedWithOptions(tmpReq: ListAlbumIsAddedRequest, headers: ListAlbumIsAddedHeaders, runtime: Util.RuntimeOptions): ListAlbumIsAddedResponse {
  Util.validateModel(tmpReq);
  var request = new ListAlbumIsAddedShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.albumIdList)) {
    request.albumIdListShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.albumIdList, 'AlbumIdList', 'json');
  }
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.albumIdListShrink)) {
    query['AlbumIdList'] = request.albumIdListShrink;
  }
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAlbumIsAdded',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listAlbumIsAdded`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 专辑是否被订阅
 *
 * @param request ListAlbumIsAddedRequest
 * @return ListAlbumIsAddedResponse
 */
async function listAlbumIsAdded(request: ListAlbumIsAddedRequest): ListAlbumIsAddedResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListAlbumIsAddedHeaders{};
  return listAlbumIsAddedWithOptions(request, headers, runtime);
}

model ListCateContentHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListCateContentRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  request?: {
    cateId?: long(name='CateId', description='This parameter is required.', example='80010'),
    isAlbum?: boolean(name='IsAlbum', description='This parameter is required.', example='false'),
    pageNum?: int32(name='PageNum', description='This parameter is required.', example='1'),
    pageSize?: int32(name='PageSize', description='This parameter is required.', example='10'),
    sortBy?: string(name='SortBy', example='hot_score'),
    sortOrder?: string(name='SortOrder', description='This parameter is required.', example='DESC'),
  }(name='Request', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListCateContentShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  requestShrink?: string(name='Request', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListCateContentResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='sucess'),
  requestId?: string(name='RequestId', description='Id of the request', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: {
    currentPageNum?: int32(name='CurrentPageNum', example='1'),
    openDataItemList?: [ 
      {
        alias?: [ string ](name='Alias'),
        audition?: boolean(name='Audition', example='true'),
        authors?: [ 
          {
            authorTypes?: [ string ](name='AuthorTypes'),
            cover?: {
              canResize?: boolean(name='CanResize', example='false'),
              img?: string(name='Img', example='https://a.jpg'),
              large?: string(name='Large', example='https://a.jpg'),
              mediam?: string(name='Mediam', example='https://a.jpg'),
              medium?: string(name='Medium', example='https://a.jpg'),
              small?: string(name='Small', example='https://a.jpg'),
            }(name='Cover'),
            description?: string(name='Description'),
            gender?: string(name='Gender', example='MALE'),
            id?: long(name='Id', example='13597709'),
            online?: boolean(name='Online', example='true'),
            rawId?: string(name='RawId', example='123123'),
            source?: string(name='Source', example='qingting'),
            title?: string(name='Title'),
          }
        ](name='Authors'),
        category?: string(name='Category', example='audio'),
        charge?: boolean(name='Charge', example='false'),
        commCateId?: string(name='CommCateId', example='80012017'),
        cover?: {
          img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
          large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718275.jpg'),
          mediam?: string(name='Mediam', example='http://pic.qtfm.cn/2017/0207/2017020718275.jpg'),
          medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/20170207175.jpg'),
          small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020675.jpg'),
          canResize?: boolean(name='canResize', example='false'),
        }(name='Cover'),
        description?: string(name='Description'),
        hotScore?: double(name='HotScore', example='0'),
        itemType?: string(name='ItemType', example='ALBUM'),
        rawId?: string(name='RawId', example='206775'),
        source?: string(name='Source', example='qingting'),
        title?: string(name='Title'),
        type?: string(name='Type', example='program'),
        valid?: string(name='Valid', example='VALID'),
        id?: long(name='id', example='26152778'),
      }
    ](name='OpenDataItemList'),
    pageSize?: int32(name='PageSize', example='10'),
    totalSize?: long(name='TotalSize', example='12002'),
  }(name='Result'),
}

model ListCateContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCateContentResponseBody(name='body'),
}

/**
 * @summary 根据特定的类目,按照指定的排序顺序获取该类目下的内容.
 *
 * @param tmpReq ListCateContentRequest
 * @param headers ListCateContentHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCateContentResponse
 */
async function listCateContentWithOptions(tmpReq: ListCateContentRequest, headers: ListCateContentHeaders, runtime: Util.RuntimeOptions): ListCateContentResponse {
  Util.validateModel(tmpReq);
  var request = new ListCateContentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.request)) {
    request.requestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.request, 'Request', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.requestShrink)) {
    body['Request'] = request.requestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListCateContent',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListCateContent`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 根据特定的类目,按照指定的排序顺序获取该类目下的内容.
 *
 * @param request ListCateContentRequest
 * @return ListCateContentResponse
 */
async function listCateContent(request: ListCateContentRequest): ListCateContentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListCateContentHeaders{};
  return listCateContentWithOptions(request, headers, runtime);
}

model ListCateInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListCateInfoRequest {
  type?: string(name='Type', description='This parameter is required.', example='song'),
}

model ListCateInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: [ 
    {
      cateId?: long(name='CateId', example='80064'),
      cateName?: string(name='CateName'),
      parentCateId?: long(name='ParentCateId', example='0'),
    }
  ](name='Result'),
}

model ListCateInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCateInfoResponseBody(name='body'),
}

/**
 * @summary 获取音乐音频类目列表
 *
 * @param request ListCateInfoRequest
 * @param headers ListCateInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCateInfoResponse
 */
async function listCateInfoWithOptions(request: ListCateInfoRequest, headers: ListCateInfoHeaders, runtime: Util.RuntimeOptions): ListCateInfoResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCateInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListCateInfo`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取音乐音频类目列表
 *
 * @param request ListCateInfoRequest
 * @return ListCateInfoResponse
 */
async function listCateInfo(request: ListCateInfoRequest): ListCateInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListCateInfoHeaders{};
  return listCateInfoWithOptions(request, headers, runtime);
}

model ListCommonCateFirstFloorHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListCommonCateFirstFloorRequest {
  type?: string(name='Type', description='This parameter is required.', example='song'),
}

model ListCommonCateFirstFloorResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: [ 
    {
      cateId?: long(name='CateId', example='80012'),
      cateName?: string(name='CateName'),
      parentCateId?: long(name='ParentCateId', example='0'),
    }
  ](name='Result'),
}

model ListCommonCateFirstFloorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCommonCateFirstFloorResponseBody(name='body'),
}

/**
 * @summary 获取音乐/音频的一级类目列表
 *
 * @param request ListCommonCateFirstFloorRequest
 * @param headers ListCommonCateFirstFloorHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCommonCateFirstFloorResponse
 */
async function listCommonCateFirstFloorWithOptions(request: ListCommonCateFirstFloorRequest, headers: ListCommonCateFirstFloorHeaders, runtime: Util.RuntimeOptions): ListCommonCateFirstFloorResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCommonCateFirstFloor',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListCommonCateFirstFloor`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取音乐/音频的一级类目列表
 *
 * @param request ListCommonCateFirstFloorRequest
 * @return ListCommonCateFirstFloorResponse
 */
async function listCommonCateFirstFloor(request: ListCommonCateFirstFloorRequest): ListCommonCateFirstFloorResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListCommonCateFirstFloorHeaders{};
  return listCommonCateFirstFloorWithOptions(request, headers, runtime);
}

model ListCommonCateSecondFloorHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListCommonCateSecondFloorRequest {
  parentCateId?: long(name='ParentCateId', example='80010'),
}

model ListCommonCateSecondFloorResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: [ 
    {
      cateId?: long(name='CateId', example='80018009'),
      cateName?: string(name='CateName'),
      parentCateId?: long(name='ParentCateId', example='80018'),
    }
  ](name='Result'),
}

model ListCommonCateSecondFloorResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCommonCateSecondFloorResponseBody(name='body'),
}

/**
 * @summary 获取指定一级类目下面的二级类目列表
 *
 * @param request ListCommonCateSecondFloorRequest
 * @param headers ListCommonCateSecondFloorHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCommonCateSecondFloorResponse
 */
async function listCommonCateSecondFloorWithOptions(request: ListCommonCateSecondFloorRequest, headers: ListCommonCateSecondFloorHeaders, runtime: Util.RuntimeOptions): ListCommonCateSecondFloorResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.parentCateId)) {
    query['ParentCateId'] = request.parentCateId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCommonCateSecondFloor',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListCommonCateSecondFloor`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取指定一级类目下面的二级类目列表
 *
 * @param request ListCommonCateSecondFloorRequest
 * @return ListCommonCateSecondFloorResponse
 */
async function listCommonCateSecondFloor(request: ListCommonCateSecondFloorRequest): ListCommonCateSecondFloorResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListCommonCateSecondFloorHeaders{};
  return listCommonCateSecondFloorWithOptions(request, headers, runtime);
}

model ListDeviceBasicInfoHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListDeviceBasicInfoRequest {
  deviceInfos?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    ids?: [ string ](name='Ids'),
    organizationId?: string(name='OrganizationId', example='1'),
  }(name='DeviceInfos'),
}

model ListDeviceBasicInfoShrinkRequest {
  deviceInfosShrink?: string(name='DeviceInfos'),
}

model ListDeviceBasicInfoResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: map[string]ResultValue(name='Result'),
}

model ListDeviceBasicInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeviceBasicInfoResponseBody(name='body'),
}

/**
 * @summary 批量获取设备基本信息
 *
 * @param tmpReq ListDeviceBasicInfoRequest
 * @param headers ListDeviceBasicInfoHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeviceBasicInfoResponse
 */
async function listDeviceBasicInfoWithOptions(tmpReq: ListDeviceBasicInfoRequest, headers: ListDeviceBasicInfoHeaders, runtime: Util.RuntimeOptions): ListDeviceBasicInfoResponse {
  Util.validateModel(tmpReq);
  var request = new ListDeviceBasicInfoShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfos)) {
    request.deviceInfosShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfos, 'DeviceInfos', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfosShrink)) {
    query['DeviceInfos'] = request.deviceInfosShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceBasicInfo',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listDeviceBasicInfo`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量获取设备基本信息
 *
 * @param request ListDeviceBasicInfoRequest
 * @return ListDeviceBasicInfoResponse
 */
async function listDeviceBasicInfo(request: ListDeviceBasicInfoRequest): ListDeviceBasicInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListDeviceBasicInfoHeaders{};
  return listDeviceBasicInfoWithOptions(request, headers, runtime);
}

model ListDeviceByUserIdHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListDeviceByUserIdRequest {
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListDeviceByUserIdShrinkRequest {
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListDeviceByUserIdResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: [ 
    {
      deviceOpenId?: string(name='DeviceOpenId', example='A963*0158'),
      deviceUnionIds?: [ 
        {
          deviceUnionId?: string(name='DeviceUnionId', example='1553*B0C3'),
          organizationId?: string(name='OrganizationId', example='1**2'),
        }
      ](name='DeviceUnionIds'),
    }
  ](name='Result'),
}

model ListDeviceByUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeviceByUserIdResponseBody(name='body'),
}

/**
 * @summary 查询用户名下的设备
 *
 * @param tmpReq ListDeviceByUserIdRequest
 * @param headers ListDeviceByUserIdHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeviceByUserIdResponse
 */
async function listDeviceByUserIdWithOptions(tmpReq: ListDeviceByUserIdRequest, headers: ListDeviceByUserIdHeaders, runtime: Util.RuntimeOptions): ListDeviceByUserIdResponse {
  Util.validateModel(tmpReq);
  var request = new ListDeviceByUserIdShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceByUserId',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listDeviceByUserId`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询用户名下的设备
 *
 * @param request ListDeviceByUserIdRequest
 * @return ListDeviceByUserIdResponse
 */
async function listDeviceByUserId(request: ListDeviceByUserIdRequest): ListDeviceByUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListDeviceByUserIdHeaders{};
  return listDeviceByUserIdWithOptions(request, headers, runtime);
}

model ListDeviceByUserIdAndChanelHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListDeviceByUserIdAndChanelRequest {
  channelInfo?: {
    channel?: string(name='Channel', description='This parameter is required.', example='WeChat、ThirdApp'),
    extInfo?: string(name='ExtInfo', example='{}'),
  }(name='ChannelInfo', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1***2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListDeviceByUserIdAndChanelShrinkRequest {
  channelInfoShrink?: string(name='ChannelInfo', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListDeviceByUserIdAndChanelResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='RE***D'),
  result?: [ 
    {
      deviceOpenId?: string(name='DeviceOpenId', example='A963*0158'),
      deviceUnionIds?: [ 
        {
          deviceUnionId?: string(name='DeviceUnionId', example='1553*B0C3'),
          organizationId?: string(name='OrganizationId', example='1***2'),
        }
      ](name='DeviceUnionIds'),
    }
  ](name='Result'),
}

model ListDeviceByUserIdAndChanelResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeviceByUserIdAndChanelResponseBody(name='body'),
}

/**
 * @summary 获取指定渠道的设备列表
 *
 * @param tmpReq ListDeviceByUserIdAndChanelRequest
 * @param headers ListDeviceByUserIdAndChanelHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeviceByUserIdAndChanelResponse
 */
async function listDeviceByUserIdAndChanelWithOptions(tmpReq: ListDeviceByUserIdAndChanelRequest, headers: ListDeviceByUserIdAndChanelHeaders, runtime: Util.RuntimeOptions): ListDeviceByUserIdAndChanelResponse {
  Util.validateModel(tmpReq);
  var request = new ListDeviceByUserIdAndChanelShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.channelInfo)) {
    request.channelInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.channelInfo, 'ChannelInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.channelInfoShrink)) {
    query['ChannelInfo'] = request.channelInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceByUserIdAndChanel',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listDeviceByUserIdAndChanel`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取指定渠道的设备列表
 *
 * @param request ListDeviceByUserIdAndChanelRequest
 * @return ListDeviceByUserIdAndChanelResponse
 */
async function listDeviceByUserIdAndChanel(request: ListDeviceByUserIdAndChanelRequest): ListDeviceByUserIdAndChanelResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListDeviceByUserIdAndChanelHeaders{};
  return listDeviceByUserIdAndChanelWithOptions(request, headers, runtime);
}

model ListDeviceIdByIdentitiesHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListDeviceIdByIdentitiesRequest {
  encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='125****0946'),
  encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
  identityIds?: [ string ](name='IdentityIds'),
  identityType?: string(name='IdentityType', description='This parameter is required.', example='MAC'),
  productKey?: string(name='ProductKey', description='This parameter is required.', example='Mm*****XnZ8'),
}

model ListDeviceIdByIdentitiesShrinkRequest {
  encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='125****0946'),
  encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
  identityIdsShrink?: string(name='IdentityIds'),
  identityType?: string(name='IdentityType', description='This parameter is required.', example='MAC'),
  productKey?: string(name='ProductKey', description='This parameter is required.', example='Mm*****XnZ8'),
}

model ListDeviceIdByIdentitiesResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: map[string]ResultValue(name='Result'),
}

model ListDeviceIdByIdentitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDeviceIdByIdentitiesResponseBody(name='body'),
}

/**
 * @summary 批量获取设备openId
 *
 * @param tmpReq ListDeviceIdByIdentitiesRequest
 * @param headers ListDeviceIdByIdentitiesHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDeviceIdByIdentitiesResponse
 */
async function listDeviceIdByIdentitiesWithOptions(tmpReq: ListDeviceIdByIdentitiesRequest, headers: ListDeviceIdByIdentitiesHeaders, runtime: Util.RuntimeOptions): ListDeviceIdByIdentitiesResponse {
  Util.validateModel(tmpReq);
  var request = new ListDeviceIdByIdentitiesShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.identityIds)) {
    request.identityIdsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.identityIds, 'IdentityIds', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.encodeKey)) {
    query['EncodeKey'] = request.encodeKey;
  }
  if (!Util.isUnset(request.encodeType)) {
    query['EncodeType'] = request.encodeType;
  }
  if (!Util.isUnset(request.identityIdsShrink)) {
    query['IdentityIds'] = request.identityIdsShrink;
  }
  if (!Util.isUnset(request.identityType)) {
    query['IdentityType'] = request.identityType;
  }
  if (!Util.isUnset(request.productKey)) {
    query['ProductKey'] = request.productKey;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDeviceIdByIdentities',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listDeviceIdByIdentities`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量获取设备openId
 *
 * @param request ListDeviceIdByIdentitiesRequest
 * @return ListDeviceIdByIdentitiesResponse
 */
async function listDeviceIdByIdentities(request: ListDeviceIdByIdentitiesRequest): ListDeviceIdByIdentitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListDeviceIdByIdentitiesHeaders{};
  return listDeviceIdByIdentitiesWithOptions(request, headers, runtime);
}

model ListMusicHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListMusicRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    musicId?: long(name='MusicId', example='1'),
    musicName?: string(name='MusicName'),
    musicType?: long(name='MusicType', description='This parameter is required.', example='1'),
    musicTypeName?: string(name='MusicTypeName', description='This parameter is required.'),
    pageSize?: int32(name='PageSize', example='10'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListMusicShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListMusicResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    model?: [ 
      {
        musicId?: long(name='MusicId', example='1'),
        musicName?: string(name='MusicName', example='xx'),
        musicType?: long(name='MusicType', example='1'),
        musicTypeName?: string(name='MusicTypeName', example='xx'),
        musicUrl?: string(name='MusicUrl', example='http://xx'),
      }
    ](name='Model'),
    pageCount?: int32(name='PageCount', example='10'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='Result'),
}

model ListMusicResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListMusicResponseBody(name='body'),
}

/**
 * @summary 基于音乐类型查询铃声列表（分页）
 *
 * @param tmpReq ListMusicRequest
 * @param headers ListMusicHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListMusicResponse
 */
async function listMusicWithOptions(tmpReq: ListMusicRequest, headers: ListMusicHeaders, runtime: Util.RuntimeOptions): ListMusicResponse {
  Util.validateModel(tmpReq);
  var request = new ListMusicShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListMusic',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listMusic`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 基于音乐类型查询铃声列表（分页）
 *
 * @param request ListMusicRequest
 * @return ListMusicResponse
 */
async function listMusic(request: ListMusicRequest): ListMusicResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListMusicHeaders{};
  return listMusicWithOptions(request, headers, runtime);
}

model ListPlayHistoryHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListPlayHistoryRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', description='This parameter is required.', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  request?: {
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    type?: string(name='Type', example='music'),
  }(name='Request', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', description='This parameter is required.', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListPlayHistoryShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  requestShrink?: string(name='Request', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListPlayHistoryResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  result?: [ 
    {
      alias?: [ string ](name='Alias'),
      audition?: boolean(name='Audition', example='false'),
      authors?: [ 
        {
          authorTypes?: [ string ](name='AuthorTypes'),
          cover?: {
            canResize?: boolean(name='CanResize', example='false'),
            img?: string(name='Img', example='https://a.jpg'),
            large?: string(name='Large', example='https://a.jpg'),
            medium?: string(name='Medium', example='https://a.jpg'),
            small?: string(name='Small', example='https://a.jpg'),
          }(name='Cover'),
          description?: string(name='Description'),
          gender?: string(name='Gender', example='MALE'),
          id?: long(name='Id', example='13597709'),
          online?: boolean(name='Online', example='false'),
          rawId?: string(name='RawId', example='123123'),
          source?: string(name='Source', example='qingting'),
          title?: string(name='Title'),
        }
      ](name='Authors'),
      category?: string(name='Category', example='audio'),
      charge?: boolean(name='Charge', example='false'),
      commCateId?: long(name='CommCateId', example='80012017'),
      cover?: {
        canResize?: boolean(name='CanResize', example='false'),
        img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        mediam?: string(name='Mediam', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      }(name='Cover'),
      description?: string(name='Description'),
      hotScore?: double(name='HotScore', example='10'),
      id?: long(name='Id', example='13597709'),
      itemType?: string(name='ItemType', example='ALBUM'),
      source?: string(name='Source', example='qingting'),
      title?: string(name='Title'),
      type?: string(name='Type', example='program'),
      valid?: string(name='Valid', example='VALID'),
    }
  ](name='Result'),
  requestId?: string(name='requestId', description='Id of the request', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
}

model ListPlayHistoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPlayHistoryResponseBody(name='body'),
}

/**
 * @summary 获取用户的播放历史
 *
 * @param tmpReq ListPlayHistoryRequest
 * @param headers ListPlayHistoryHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPlayHistoryResponse
 */
async function listPlayHistoryWithOptions(tmpReq: ListPlayHistoryRequest, headers: ListPlayHistoryHeaders, runtime: Util.RuntimeOptions): ListPlayHistoryResponse {
  Util.validateModel(tmpReq);
  var request = new ListPlayHistoryShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.request)) {
    request.requestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.request, 'Request', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.requestShrink)) {
    body['Request'] = request.requestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListPlayHistory',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListPlayHistory`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户的播放历史
 *
 * @param request ListPlayHistoryRequest
 * @return ListPlayHistoryResponse
 */
async function listPlayHistory(request: ListPlayHistoryRequest): ListPlayHistoryResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListPlayHistoryHeaders{};
  return listPlayHistoryWithOptions(request, headers, runtime);
}

model ListRecommendContentHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListRecommendContentRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
    id?: string(name='Id', example='DAFE****ce3ej='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  request?: {
    count?: int32(name='Count', example='10'),
    type?: string(name='Type', example='song'),
  }(name='Request', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', example='12**45'),
    encodeType?: string(name='EncodeType', example='PACKAGE_NAME'),
    id?: string(name='Id', example='HOFF****my7Iw='),
    idType?: string(name='IdType', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListRecommendContentShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  requestShrink?: string(name='Request', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListRecommendContentResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: [ 
    {
      alias?: [ string ](name='Alias'),
      audition?: boolean(name='Audition', example='false'),
      authors?: [ 
        {
          authorTypes?: [ string ](name='AuthorTypes'),
          cover?: {
            canResize?: boolean(name='CanResize', example='false'),
            img?: string(name='Img', example='https://a.jpg'),
            large?: string(name='Large', example='https://a.jpg'),
            medium?: string(name='Medium', example='https://a.jpg'),
            small?: string(name='Small', example='https://a.jpg'),
          }(name='Cover'),
          description?: string(name='Description'),
          gender?: string(name='Gender', example='MALE'),
          id?: long(name='Id', example='13597709'),
          online?: boolean(name='Online', example='false'),
          rawId?: string(name='RawId', example='12311'),
          source?: string(name='Source', example='qingting'),
          title?: string(name='Title'),
        }
      ](name='Authors'),
      category?: string(name='Category', example='audio'),
      charge?: boolean(name='Charge', example='false'),
      commCateId?: long(name='CommCateId', example='80012017'),
      cover?: {
        canResize?: boolean(name='CanResize', example='false'),
        img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        mediam?: string(name='Mediam', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      }(name='Cover'),
      description?: string(name='Description'),
      hotScore?: double(name='HotScore', example='10'),
      id?: long(name='Id', example='13597709'),
      itemType?: string(name='ItemType', example='ALBUM'),
      rawId?: string(name='RawId', example='123123'),
      source?: string(name='Source', example='qingting'),
      title?: string(name='Title'),
      type?: string(name='Type', example='program'),
      valid?: string(name='Valid', example='VALID'),
    }
  ](name='Result'),
}

model ListRecommendContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRecommendContentResponseBody(name='body'),
}

/**
 * @summary 获取每日推荐的音乐或者音频
 *
 * @param tmpReq ListRecommendContentRequest
 * @param headers ListRecommendContentHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRecommendContentResponse
 */
async function listRecommendContentWithOptions(tmpReq: ListRecommendContentRequest, headers: ListRecommendContentHeaders, runtime: Util.RuntimeOptions): ListRecommendContentResponse {
  Util.validateModel(tmpReq);
  var request = new ListRecommendContentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.request)) {
    request.requestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.request, 'Request', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.requestShrink)) {
    body['Request'] = request.requestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListRecommendContent',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ListRecommendContent`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取每日推荐的音乐或者音频
 *
 * @param request ListRecommendContentRequest
 * @return ListRecommendContentResponse
 */
async function listRecommendContent(request: ListRecommendContentRequest): ListRecommendContentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListRecommendContentHeaders{};
  return listRecommendContentWithOptions(request, headers, runtime);
}

model ListSubHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListSubRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo', description='This parameter is required.'),
  page?: {
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
  }(name='Page', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='UNION_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ListSubShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  pageShrink?: string(name='Page', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ListSubResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0D0C09C2-ADC1-198B-964D-24F4FAD967DB'),
  result?: {
    dataList?: [ 
      {
        albumId?: string(name='AlbumId', example='51999575'),
        coverUrl?: string(name='CoverUrl', example='https://ailabs.alibabausercontent.com/images/8838/1600839452498.jpg'),
        dailyStudyCnt?: int32(name='DailyStudyCnt', example='2'),
        deviceId?: string(name='DeviceId', example='5874DBCCA3038FAA1A70A8060F07F26D'),
        id?: long(name='Id', example='1'),
        playMode?: string(name='PlayMode', example='sequence'),
        scheduleInfo?: {
          daysOfWeek?: [ int32 ](name='DaysOfWeek'),
          hour?: int32(name='Hour', example='12'),
          minute?: int32(name='Minute', example='23'),
        }(name='ScheduleInfo'),
        title?: string(name='Title', example='小科学家探索'),
        userId?: long(name='UserId', example='1152893538998276761'),
      }
    ](name='DataList'),
    hasNext?: boolean(name='HasNext'),
    totalCount?: long(name='TotalCount', example='3'),
    totalPageCount?: int32(name='TotalPageCount', example='1'),
  }(name='Result'),
}

model ListSubResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSubResponseBody(name='body'),
}

/**
 * @summary 订阅列表
 *
 * @param tmpReq ListSubRequest
 * @param headers ListSubHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSubResponse
 */
async function listSubWithOptions(tmpReq: ListSubRequest, headers: ListSubHeaders, runtime: Util.RuntimeOptions): ListSubResponse {
  Util.validateModel(tmpReq);
  var request = new ListSubShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.page)) {
    request.pageShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.page, 'Page', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.pageShrink)) {
    query['Page'] = request.pageShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSub',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listSub`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 订阅列表
 *
 * @param request ListSubRequest
 * @return ListSubResponse
 */
async function listSub(request: ListSubRequest): ListSubResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListSubHeaders{};
  return listSubWithOptions(request, headers, runtime);
}

model ListSubAlbumHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListSubAlbumRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    id?: string(name='Id'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo'),
  querySubscriptionAlbumRequest?: {
    albumId?: string(name='AlbumId', example='4476001'),
    categoryId?: int32(name='CategoryId', description='This parameter is required.', example='80011'),
    page?: {
      pageNum?: int32(name='PageNum', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
    }(name='Page', description='This parameter is required.'),
    title?: string(name='Title', example='睡前故事'),
  }(name='QuerySubscriptionAlbumRequest', description='request'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    id?: string(name='Id'),
    idType?: string(name='IdType'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo'),
}

model ListSubAlbumShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo'),
  querySubscriptionAlbumRequestShrink?: string(name='QuerySubscriptionAlbumRequest', description='request'),
  userInfoShrink?: string(name='UserInfo'),
}

model ListSubAlbumResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='CB13B8D7-37FB-1B3E-8EB9-65BB413267E1'),
  result?: {
    dataList?: [ 
      {
        albumId?: string(name='AlbumId', example='4476001'),
        categoryId?: int32(name='CategoryId', example='80011'),
        coverUrl?: string(name='CoverUrl', example='https://ailabs.alibabausercontent.com/images/17825/jknoamc2.jpg'),
        id?: long(name='Id', example='1'),
        isAdded?: boolean(name='IsAdded'),
        scheduleInfo?: {
          daysOfWeek?: [ int32 ](name='DaysOfWeek'),
          hour?: int32(name='Hour', example='12'),
          minute?: int32(name='Minute', example='23'),
          scheduleId?: long(name='ScheduleId'),
        }(name='ScheduleInfo'),
        sequence?: long(name='Sequence', example='1'),
        title?: string(name='Title', example='睡前故事'),
        totalEpisode?: int32(name='TotalEpisode', example='23'),
      }
    ](name='DataList'),
    hasNext?: boolean(name='HasNext'),
    totalCount?: int32(name='TotalCount', example='3'),
    totalPageCount?: int32(name='TotalPageCount', example='1'),
  }(name='Result'),
}

model ListSubAlbumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSubAlbumResponseBody(name='body'),
}

/**
 * @summary 订阅专辑元数据列表
 *
 * @param tmpReq ListSubAlbumRequest
 * @param headers ListSubAlbumHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSubAlbumResponse
 */
async function listSubAlbumWithOptions(tmpReq: ListSubAlbumRequest, headers: ListSubAlbumHeaders, runtime: Util.RuntimeOptions): ListSubAlbumResponse {
  Util.validateModel(tmpReq);
  var request = new ListSubAlbumShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.querySubscriptionAlbumRequest)) {
    request.querySubscriptionAlbumRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.querySubscriptionAlbumRequest, 'QuerySubscriptionAlbumRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.querySubscriptionAlbumRequestShrink)) {
    query['QuerySubscriptionAlbumRequest'] = request.querySubscriptionAlbumRequestShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSubAlbum',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listSubAlbum`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 订阅专辑元数据列表
 *
 * @param request ListSubAlbumRequest
 * @return ListSubAlbumResponse
 */
async function listSubAlbum(request: ListSubAlbumRequest): ListSubAlbumResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListSubAlbumHeaders{};
  return listSubAlbumWithOptions(request, headers, runtime);
}

model ListSubscriptionAlbumCategoryHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListSubscriptionAlbumCategoryRequest {
  categoryName?: string(name='CategoryName', example='儿歌'),
}

model ListSubscriptionAlbumCategoryResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='60E7A523-9766-1D07-87A2-6E587420C59B'),
  result?: [ 
    {
      categoryId?: string(name='CategoryId', example='80011'),
      categoryName?: string(name='CategoryName', example='儿童'),
    }
  ](name='Result'),
}

model ListSubscriptionAlbumCategoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListSubscriptionAlbumCategoryResponseBody(name='body'),
}

/**
 * @summary 内容订阅元数据分类
 *
 * @param request ListSubscriptionAlbumCategoryRequest
 * @param headers ListSubscriptionAlbumCategoryHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListSubscriptionAlbumCategoryResponse
 */
async function listSubscriptionAlbumCategoryWithOptions(request: ListSubscriptionAlbumCategoryRequest, headers: ListSubscriptionAlbumCategoryHeaders, runtime: Util.RuntimeOptions): ListSubscriptionAlbumCategoryResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.categoryName)) {
    query['CategoryName'] = request.categoryName;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListSubscriptionAlbumCategory',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listSubscriptionAlbumCategory`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 内容订阅元数据分类
 *
 * @param request ListSubscriptionAlbumCategoryRequest
 * @return ListSubscriptionAlbumCategoryResponse
 */
async function listSubscriptionAlbumCategory(request: ListSubscriptionAlbumCategoryRequest): ListSubscriptionAlbumCategoryResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListSubscriptionAlbumCategoryHeaders{};
  return listSubscriptionAlbumCategoryWithOptions(request, headers, runtime);
}

model ListUserMessageHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ListUserMessageRequest {
  beforeTime?: string(name='BeforeTime', example='2022-07-27 14:06:55.984'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
  limit?: int32(name='limit', example='10'),
}

model ListUserMessageShrinkRequest {
  beforeTime?: string(name='BeforeTime', example='2022-07-27 14:06:55.984'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
  limit?: int32(name='limit', example='10'),
}

model ListUserMessageResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  result?: [ 
    {
      content?: string(name='Content'),
      deviceName?: string(name='DeviceName'),
      gmtCreate?: string(name='GmtCreate', example='2022-07-27 14:06:27.000'),
      id?: string(name='Id', example='123456'),
      pic?: string(name='Pic', example='http://xx'),
      source?: string(name='Source', example='app'),
      sourceUuid?: string(name='SourceUuid', example='AF188**065EE4B**DD68CE**951D84D4'),
      status?: int32(name='Status', example='0'),
      type?: string(name='Type', example='audio'),
      url?: string(name='Url', example='http://xx'),
    }
  ](name='Result'),
}

model ListUserMessageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUserMessageResponseBody(name='body'),
}

/**
 * @summary 获取留言列表
 *
 * @param tmpReq ListUserMessageRequest
 * @param headers ListUserMessageHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUserMessageResponse
 */
async function listUserMessageWithOptions(tmpReq: ListUserMessageRequest, headers: ListUserMessageHeaders, runtime: Util.RuntimeOptions): ListUserMessageResponse {
  Util.validateModel(tmpReq);
  var request = new ListUserMessageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.beforeTime)) {
    query['BeforeTime'] = request.beforeTime;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }
  if (!Util.isUnset(request.limit)) {
    query['limit'] = request.limit;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUserMessage',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/listUserMessage`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取留言列表
 *
 * @param request ListUserMessageRequest
 * @return ListUserMessageResponse
 */
async function listUserMessage(request: ListUserMessageRequest): ListUserMessageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ListUserMessageHeaders{};
  return listUserMessageWithOptions(request, headers, runtime);
}

model MobileRecommendHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model MobileRecommendRequest {
  botId?: string(name='BotId', example='10'),
  count?: string(name='Count', example='6'),
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='1414895629783187053'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='fjwZiYQdtkaI95fHaLNjYcaOA/mxUPzxxw2J5iBiTBnjUCWKwER4TSHCqkBnNOYvGJ4bRZA9KzBB2naS4r/Am0lSe8ECDAAOcJ9QKLFF6DM='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo', description='This parameter is required.'),
  style?: string(name='Style'),
  type?: string(name='Type', example='DAILY_REC'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='1414895629783187053'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='R457Av3qg/OXTwVnFt12z6MwNe0HAS699V6n63OaLdu+VmwvhcNfMzBd+la553wWJhj3kBMjgHq2Y2dyCFoDBg=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='UserInfo', description='This parameter is required.'),
}

model MobileRecommendShrinkRequest {
  botId?: string(name='BotId', example='10'),
  count?: string(name='Count', example='6'),
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  style?: string(name='Style'),
  type?: string(name='Type', example='DAILY_REC'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model MobileRecommendResponseBody = {
  code?: string(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', description='Id of the request', example='5C5809B4-F465-52E0-9A8B-61396F9E593B'),
  result?: [ 
    {
      authors?: [ string ](name='Authors'),
      cover?: string(name='Cover', example='http://img4.kuwo.cn/star/albumcover/120/78/77/1688821132.jpg'),
      rawId?: string(name='RawId', example='550144364'),
      source?: string(name='Source', example='KG'),
      title?: string(name='Title'),
    }
  ](name='Result'),
}

model MobileRecommendResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MobileRecommendResponseBody(name='body'),
}

/**
 * @summary 移动轻纳管
 *
 * @param tmpReq MobileRecommendRequest
 * @param headers MobileRecommendHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return MobileRecommendResponse
 */
async function mobileRecommendWithOptions(tmpReq: MobileRecommendRequest, headers: MobileRecommendHeaders, runtime: Util.RuntimeOptions): MobileRecommendResponse {
  Util.validateModel(tmpReq);
  var request = new MobileRecommendShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.botId)) {
    query['BotId'] = request.botId;
  }
  if (!Util.isUnset(request.count)) {
    query['Count'] = request.count;
  }
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.style)) {
    query['Style'] = request.style;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'MobileRecommend',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/mobile/recommend/music`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 移动轻纳管
 *
 * @param request MobileRecommendRequest
 * @return MobileRecommendResponse
 */
async function mobileRecommend(request: MobileRecommendRequest): MobileRecommendResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new MobileRecommendHeaders{};
  return mobileRecommendWithOptions(request, headers, runtime);
}

model PlayAndPauseControlHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model PlayAndPauseControlRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openPlayAndPauseControlParam?: {
    openPlayAndPauseCommand?: string(name='OpenPlayAndPauseCommand', description='This parameter is required.', example='Play'),
  }(name='OpenPlayAndPauseControlParam', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model PlayAndPauseControlShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openPlayAndPauseControlParamShrink?: string(name='OpenPlayAndPauseControlParam', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model PlayAndPauseControlResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: boolean(name='Result', example='true'),
  success?: string(name='Success', example='true'),
}

model PlayAndPauseControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PlayAndPauseControlResponseBody(name='body'),
}

/**
 * @summary 播放暂停控制
 *
 * @param tmpReq PlayAndPauseControlRequest
 * @param headers PlayAndPauseControlHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return PlayAndPauseControlResponse
 */
async function playAndPauseControlWithOptions(tmpReq: PlayAndPauseControlRequest, headers: PlayAndPauseControlHeaders, runtime: Util.RuntimeOptions): PlayAndPauseControlResponse {
  Util.validateModel(tmpReq);
  var request = new PlayAndPauseControlShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openPlayAndPauseControlParam)) {
    request.openPlayAndPauseControlParamShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openPlayAndPauseControlParam, 'OpenPlayAndPauseControlParam', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openPlayAndPauseControlParamShrink)) {
    body['OpenPlayAndPauseControlParam'] = request.openPlayAndPauseControlParamShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PlayAndPauseControl',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/PlayAndPauseControl`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 播放暂停控制
 *
 * @param request PlayAndPauseControlRequest
 * @return PlayAndPauseControlResponse
 */
async function playAndPauseControl(request: PlayAndPauseControlRequest): PlayAndPauseControlResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new PlayAndPauseControlHeaders{};
  return playAndPauseControlWithOptions(request, headers, runtime);
}

model PlayModeControlHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model PlayModeControlRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openPlayModeControlRequest?: {
    openPlayMode?: string(name='OpenPlayMode', description='This parameter is required.', example='Normal'),
  }(name='OpenPlayModeControlRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model PlayModeControlShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openPlayModeControlRequestShrink?: string(name='OpenPlayModeControlRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model PlayModeControlResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: {
    openPlayMode?: string(name='OpenPlayMode', example='Normal'),
  }(name='Result'),
  success?: string(name='Success', example='true'),
}

model PlayModeControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PlayModeControlResponseBody(name='body'),
}

/**
 * @summary 播放模式切换
 *
 * @param tmpReq PlayModeControlRequest
 * @param headers PlayModeControlHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return PlayModeControlResponse
 */
async function playModeControlWithOptions(tmpReq: PlayModeControlRequest, headers: PlayModeControlHeaders, runtime: Util.RuntimeOptions): PlayModeControlResponse {
  Util.validateModel(tmpReq);
  var request = new PlayModeControlShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openPlayModeControlRequest)) {
    request.openPlayModeControlRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openPlayModeControlRequest, 'OpenPlayModeControlRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openPlayModeControlRequestShrink)) {
    body['OpenPlayModeControlRequest'] = request.openPlayModeControlRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PlayModeControl',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/PlayModeControl`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 播放模式切换
 *
 * @param request PlayModeControlRequest
 * @return PlayModeControlResponse
 */
async function playModeControl(request: PlayModeControlRequest): PlayModeControlResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new PlayModeControlHeaders{};
  return playModeControlWithOptions(request, headers, runtime);
}

model PreviousAndNextControlHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model PreviousAndNextControlRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openControlPlayingListRequest?: {
    cmd?: string(name='Cmd', description='This parameter is required.', example='NEXT'),
    extendInfo?: map[string]any(name='ExtendInfo'),
    isFromDevice?: boolean(name='IsFromDevice', example='false'),
  }(name='OpenControlPlayingListRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model PreviousAndNextControlShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openControlPlayingListRequestShrink?: string(name='OpenControlPlayingListRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model PreviousAndNextControlResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: {
    albumName?: string(name='AlbumName'),
    albumRawId?: string(name='AlbumRawId', example='260744'),
    audioLength?: int32(name='AudioLength', example='190'),
    copyright?: int32(name='Copyright', example='0'),
    cover?: {
      canResize?: boolean(name='CanResize', example='false'),
      img?: string(name='Img', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      large?: string(name='Large', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      mediam?: string(name='Mediam', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      medium?: string(name='Medium', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
      small?: string(name='Small', example='http://imgopen.xmcdn.com/group58/M06/08/9B/wKgLglzTyTjiOy0oAAcOTv16ohg815.jpg!op_type=3&columns=640&rows=640'),
    }(name='Cover'),
    defaultPlayOrder?: int32(name='DefaultPlayOrder', example='1'),
    itemUrl?: string(name='ItemUrl', example='https://openaudio.cos.tx.xmcdn.com/storages/587f-audiofreehighqps/15/CE/GKwRIJIGnb11ABc6SwF59DNb.mp3'),
    liked?: boolean(name='Liked', example='false'),
    lyricUrl?: string(name='LyricUrl', example='https://aicontent.alibabausercontent.com/lyric/thirdsource/6f4c8408073db134b0d097c122b5a1a1.lrc'),
    playMode?: string(name='PlayMode', example='Repeat'),
    pos?: int32(name='Pos', example='0'),
    progress?: int32(name='Progress', example='0'),
    rawId?: string(name='RawId', example='550144364'),
    singer?: string(name='Singer'),
    source?: string(name='Source', example='ximalayav2'),
    title?: string(name='Title'),
    type?: string(name='Type', example='story'),
    valid?: string(name='Valid', example='VALID'),
  }(name='Result'),
  success?: string(name='Success', example='true'),
}

model PreviousAndNextControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PreviousAndNextControlResponseBody(name='body'),
}

/**
 * @summary 上下首控制
 *
 * @param tmpReq PreviousAndNextControlRequest
 * @param headers PreviousAndNextControlHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return PreviousAndNextControlResponse
 */
async function previousAndNextControlWithOptions(tmpReq: PreviousAndNextControlRequest, headers: PreviousAndNextControlHeaders, runtime: Util.RuntimeOptions): PreviousAndNextControlResponse {
  Util.validateModel(tmpReq);
  var request = new PreviousAndNextControlShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openControlPlayingListRequest)) {
    request.openControlPlayingListRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openControlPlayingListRequest, 'OpenControlPlayingListRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openControlPlayingListRequestShrink)) {
    body['OpenControlPlayingListRequest'] = request.openControlPlayingListRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'PreviousAndNextControl',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/PreviousAndNextControl`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 上下首控制
 *
 * @param request PreviousAndNextControlRequest
 * @return PreviousAndNextControlResponse
 */
async function previousAndNextControl(request: PreviousAndNextControlRequest): PreviousAndNextControlResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new PreviousAndNextControlHeaders{};
  return previousAndNextControlWithOptions(request, headers, runtime);
}

model ProgressControlHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ProgressControlRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='DeviceInfo', description='This parameter is required.'),
  openProgressControlRequest?: {
    extendInfo?: map[string]any(name='ExtendInfo'),
    progress?: int32(name='Progress', description='This parameter is required.', example='12'),
  }(name='OpenProgressControlRequest', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='rV/XSgPuxZjx/hN3iw8U+e8ouRjKOX95tn1a0kwb2+Ao6Q1CAxASJUZDWtlk1r43LWcVW6fvY1Rr4sEPFodpnA=='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='123'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ProgressControlShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  openProgressControlRequestShrink?: string(name='OpenProgressControlRequest', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ProgressControlResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='10002398812'),
  result?: boolean(name='Result', example='true'),
  success?: string(name='Success', example='true'),
}

model ProgressControlResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ProgressControlResponseBody(name='body'),
}

/**
 * @summary 进度控制
 *
 * @param tmpReq ProgressControlRequest
 * @param headers ProgressControlHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ProgressControlResponse
 */
async function progressControlWithOptions(tmpReq: ProgressControlRequest, headers: ProgressControlHeaders, runtime: Util.RuntimeOptions): ProgressControlResponse {
  Util.validateModel(tmpReq);
  var request = new ProgressControlShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.openProgressControlRequest)) {
    request.openProgressControlRequestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.openProgressControlRequest, 'OpenProgressControlRequest', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.openProgressControlRequestShrink)) {
    body['OpenProgressControlRequest'] = request.openProgressControlRequestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ProgressControl',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/ProgressControl`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 进度控制
 *
 * @param request ProgressControlRequest
 * @return ProgressControlResponse
 */
async function progressControl(request: ProgressControlRequest): ProgressControlResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ProgressControlHeaders{};
  return progressControlWithOptions(request, headers, runtime);
}

model QueryMusicTypeHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model QueryMusicTypeRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
  }(name='Payload'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model QueryMusicTypeShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model QueryMusicTypeResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: [ 
    {
      musicType?: long(name='MusicType', example='1'),
      musicTypeName?: string(name='MusicTypeName', example='xx'),
    }
  ](name='Result'),
}

model QueryMusicTypeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryMusicTypeResponseBody(name='body'),
}

/**
 * @summary 获取闹钟音乐类型列表
 *
 * @param tmpReq QueryMusicTypeRequest
 * @param headers QueryMusicTypeHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryMusicTypeResponse
 */
async function queryMusicTypeWithOptions(tmpReq: QueryMusicTypeRequest, headers: QueryMusicTypeHeaders, runtime: Util.RuntimeOptions): QueryMusicTypeResponse {
  Util.validateModel(tmpReq);
  var request = new QueryMusicTypeShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryMusicType',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/queryMusicType`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取闹钟音乐类型列表
 *
 * @param request QueryMusicTypeRequest
 * @return QueryMusicTypeResponse
 */
async function queryMusicType(request: QueryMusicTypeRequest): QueryMusicTypeResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new QueryMusicTypeHeaders{};
  return queryMusicTypeWithOptions(request, headers, runtime);
}

model QueryUserDeviceListByTmeUserIdHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model QueryUserDeviceListByTmeUserIdRequest {
  sp?: string(name='Sp', description='This parameter is required.'),
  tmeUserId?: string(name='TmeUserId', description='This parameter is required.'),
}

model QueryUserDeviceListByTmeUserIdResponseBody = {
  code?: int32(name='Code'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId'),
  result?: {
    aligenieUserInfoList?: [ 
      {
        authorizedDeviceList?: [ 
          {
            deviceName?: string(name='DeviceName'),
            online?: boolean(name='Online', example='true'),
            openDeviceId?: string(name='OpenDeviceId'),
            tmeDeviceId?: string(name='TmeDeviceId'),
            tmeProductId?: string(name='TmeProductId'),
          }
        ](name='AuthorizedDeviceList'),
        openUserId?: string(name='OpenUserId'),
        userNickname?: string(name='UserNickname'),
      }
    ](name='AligenieUserInfoList'),
    encodeKey?: string(name='EncodeKey'),
    encodeType?: string(name='EncodeType'),
    sp?: string(name='Sp'),
  }(name='Result'),
  success?: boolean(name='Success'),
}

model QueryUserDeviceListByTmeUserIdResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryUserDeviceListByTmeUserIdResponseBody(name='body'),
}

/**
 * @summary 通过tme用户id获取授权的天猫精灵用户+设备列表
 *
 * @param request QueryUserDeviceListByTmeUserIdRequest
 * @param headers QueryUserDeviceListByTmeUserIdHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryUserDeviceListByTmeUserIdResponse
 */
async function queryUserDeviceListByTmeUserIdWithOptions(request: QueryUserDeviceListByTmeUserIdRequest, headers: QueryUserDeviceListByTmeUserIdHeaders, runtime: Util.RuntimeOptions): QueryUserDeviceListByTmeUserIdResponse {
  Util.validateModel(request);
  var query : map[string]any = {};
  if (!Util.isUnset(request.sp)) {
    query['Sp'] = request.sp;
  }
  if (!Util.isUnset(request.tmeUserId)) {
    query['TmeUserId'] = request.tmeUserId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryUserDeviceListByTmeUserId',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/queryUserDeviceListByTmeUserId`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 通过tme用户id获取授权的天猫精灵用户+设备列表
 *
 * @param request QueryUserDeviceListByTmeUserIdRequest
 * @return QueryUserDeviceListByTmeUserIdResponse
 */
async function queryUserDeviceListByTmeUserId(request: QueryUserDeviceListByTmeUserIdRequest): QueryUserDeviceListByTmeUserIdResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new QueryUserDeviceListByTmeUserIdHeaders{};
  return queryUserDeviceListByTmeUserIdWithOptions(request, headers, runtime);
}

model ReadMessageHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ReadMessageRequest {
  messageId?: long(name='MessageId', example='12345'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123L'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ReadMessageShrinkRequest {
  messageId?: long(name='MessageId', example='12345'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ReadMessageResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  result?: boolean(name='Result', example='true'),
}

model ReadMessageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReadMessageResponseBody(name='body'),
}

/**
 * @summary 读取留言
 *
 * @param tmpReq ReadMessageRequest
 * @param headers ReadMessageHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReadMessageResponse
 */
async function readMessageWithOptions(tmpReq: ReadMessageRequest, headers: ReadMessageHeaders, runtime: Util.RuntimeOptions): ReadMessageResponse {
  Util.validateModel(tmpReq);
  var request = new ReadMessageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.messageId)) {
    query['MessageId'] = request.messageId;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ReadMessage',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/readMessage`,
    method = 'GET',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 读取留言
 *
 * @param request ReadMessageRequest
 * @return ReadMessageResponse
 */
async function readMessage(request: ReadMessageRequest): ReadMessageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ReadMessageHeaders{};
  return readMessageWithOptions(request, headers, runtime);
}

model ScanCodeBindHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ScanCodeBindRequest {
  bindReq?: {
    clientId?: string(name='ClientId', description='This parameter is required.', example='RnY8v0W0ZVn58ZrUAOr2RD'),
    code?: string(name='Code', description='authCode

This parameter is required.', example='ASdfre'),
    extInfo?: string(name='ExtInfo', example='{"key":"value"}'),
  }(name='BindReq', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='129****0946'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='111'),
  }(name='UserInfo', description='This parameter is required.'),
}

model ScanCodeBindShrinkRequest {
  bindReqShrink?: string(name='BindReq', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model ScanCodeBindResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='686DF82F-45C4-7DF7-8B67-27B91CFD63A9'),
  result?: {
    bizGroup?: string(name='BizGroup', example='X1'),
    bizType?: string(name='BizType', example='AILABS'),
    deviceOpenId?: string(name='DeviceOpenId', description='A963*0158', example='设备OpenId'),
    userOpenId?: string(name='UserOpenId', description='DAFE****ce3ej=', example='用户opneId'),
  }(name='Result'),
}

model ScanCodeBindResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScanCodeBindResponseBody(name='body'),
}

/**
 * @summary 扫描二维码激活绑定设备
 *
 * @param tmpReq ScanCodeBindRequest
 * @param headers ScanCodeBindHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScanCodeBindResponse
 */
async function scanCodeBindWithOptions(tmpReq: ScanCodeBindRequest, headers: ScanCodeBindHeaders, runtime: Util.RuntimeOptions): ScanCodeBindResponse {
  Util.validateModel(tmpReq);
  var request = new ScanCodeBindShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.bindReq)) {
    request.bindReqShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.bindReq, 'BindReq', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.bindReqShrink)) {
    body['BindReq'] = request.bindReqShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ScanCodeBind',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/scanCode`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 扫描二维码激活绑定设备
 *
 * @param request ScanCodeBindRequest
 * @return ScanCodeBindResponse
 */
async function scanCodeBind(request: ScanCodeBindRequest): ScanCodeBindResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ScanCodeBindHeaders{};
  return scanCodeBindWithOptions(request, headers, runtime);
}

model ScgSearchHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model ScgSearchRequest {
  scgFilter?: {
    offSetParam?: {
      limit?: int32(name='Limit', example='20'),
      offset?: int32(name='Offset', example='10'),
    }(name='OffSetParam'),
    pageParam?: {
      pageNum?: int32(name='PageNum', example='1'),
      pageSize?: int32(name='PageSize', example='10'),
    }(name='PageParam'),
    sortParam?: {
      sortKey?: string(name='SortKey', example='internal_id'),
      sortOrder?: string(name='SortOrder', example='ASC'),
      sortText?: string(name='SortText', example='“”'),
    }(name='SortParam', description='This parameter is required.'),
    useOffSet?: boolean(name='UseOffSet', description='This parameter is required.', example='true'),
  }(name='ScgFilter', description='This parameter is required.'),
  topicId?: string(name='TopicId', description='This parameter is required.', example='MC201132'),
}

model ScgSearchShrinkRequest {
  scgFilterShrink?: string(name='ScgFilter', description='This parameter is required.'),
  topicId?: string(name='TopicId', description='This parameter is required.', example='MC201132'),
}

model ScgSearchResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  result?: [ 
    {
      album?: boolean(name='Album', example='false'),
      albumRawId?: string(name='AlbumRawId', example='1795716629'),
      albumType?: int32(name='AlbumType', example='0'),
      alias?: [ string ](name='Alias'),
      authorIds?: [ long ](name='AuthorIds'),
      authorNames?: [ string ](name='AuthorNames'),
      category?: string(name='Category', example='audio'),
      contentType?: string(name='ContentType', example='MUSIC_CONTENT'),
      cover?: {
        img?: string(name='Img', example='http://img.xiami.net/images/album/img59/56/58da2153e3133_2826959_1490690387.jpg'),
        large?: string(name='Large', example='http://img.xiami.net/images/album/img59/56/58da2153e3133_2826959_1490690387.jpg'),
        medium?: string(name='Medium', example='http://img.xiami.net/images/album/img59/56/58da2153e3133_2826959_1490690387.jpg'),
        small?: string(name='Small', example='http://img.xiami.net/images/album/img59/56/58da2153e3133_2826959_1490690387.jpg'),
        canResize?: boolean(name='canResize', example='false'),
      }(name='Cover'),
      isAudition?: boolean(name='IsAudition', example='false'),
      isCharge?: string(name='IsCharge', example='false'),
      needCharge?: boolean(name='NeedCharge', example='false'),
      rawId?: string(name='RawId', example='1795716629'),
      singers?: string(name='Singers'),
      source?: string(name='Source', example='xiami'),
      supportAudition?: boolean(name='SupportAudition', example='false'),
      title?: string(name='Title'),
      type?: string(name='Type', example='music'),
    }
  ](name='Result'),
}

model ScgSearchResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ScgSearchResponseBody(name='body'),
}

/**
 * @summary 选品池投放能力
 *
 * @param tmpReq ScgSearchRequest
 * @param headers ScgSearchHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return ScgSearchResponse
 */
async function scgSearchWithOptions(tmpReq: ScgSearchRequest, headers: ScgSearchHeaders, runtime: Util.RuntimeOptions): ScgSearchResponse {
  Util.validateModel(tmpReq);
  var request = new ScgSearchShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.scgFilter)) {
    request.scgFilterShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.scgFilter, 'ScgFilter', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.scgFilterShrink)) {
    query['ScgFilter'] = request.scgFilterShrink;
  }
  if (!Util.isUnset(request.topicId)) {
    query['TopicId'] = request.topicId;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ScgSearch',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/scgSearch`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 选品池投放能力
 *
 * @param request ScgSearchRequest
 * @return ScgSearchResponse
 */
async function scgSearch(request: ScgSearchRequest): ScgSearchResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new ScgSearchHeaders{};
  return scgSearchWithOptions(request, headers, runtime);
}

model SearchContentHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model SearchContentRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  request?: {
    cate?: string(name='Cate', example='music'),
    pageNum?: int32(name='PageNum', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    query?: string(name='Query'),
    queryAlbum?: boolean(name='QueryAlbum', example='false'),
    subCate?: string(name='SubCate', example='singer'),
  }(name='Request', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model SearchContentShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  requestShrink?: string(name='Request', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model SearchContentResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', description='Id of the request', example='F12B6147-5925-19E5-A3AD-E1EE1360F34E'),
  result?: [ 
    {
      albumId?: string(name='AlbumId', example='13123'),
      alias?: [ string ](name='Alias'),
      audition?: boolean(name='Audition', example='false'),
      authors?: [ 
        {
          authorTypes?: [ string ](name='AuthorTypes'),
          cover?: {
            canResize?: boolean(name='CanResize', example='false'),
            img?: string(name='Img', example='https://a.jpg'),
            large?: string(name='Large', example='https://a.jpg'),
            medium?: string(name='Medium', example='https://a.jpg'),
            small?: string(name='Small', example='https://a.jpg'),
          }(name='Cover'),
          description?: string(name='Description'),
          gender?: string(name='Gender', example='MALE'),
          id?: long(name='Id', example='13597709'),
          online?: boolean(name='Online', example='true'),
          rawId?: string(name='RawId', example='123123'),
          source?: string(name='Source', example='qingting'),
          title?: string(name='Title'),
        }
      ](name='Authors'),
      category?: string(name='Category', example='audio'),
      charge?: boolean(name='Charge', example='fasle'),
      commCateId?: long(name='CommCateId', example='80012017'),
      cover?: {
        canResize?: boolean(name='CanResize', example='false'),
        img?: string(name='Img', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        large?: string(name='Large', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        mediam?: string(name='Mediam', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        medium?: string(name='Medium', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
        small?: string(name='Small', example='http://pic.qtfm.cn/2017/0207/2017020718285.jpg'),
      }(name='Cover'),
      description?: string(name='Description'),
      duration?: long(name='Duration', example='180'),
      hotScore?: double(name='HotScore', example='10'),
      id?: long(name='Id', example='13597709'),
      itemType?: string(name='ItemType', example='ALBUM'),
      lyric?: string(name='Lyric', example='http://a1231.lrc'),
      orderIndex?: string(name='OrderIndex', example='1'),
      source?: string(name='Source', example='qingting'),
      styles?: [ string ](name='Styles'),
      title?: string(name='Title'),
      type?: string(name='Type', example='program'),
      valid?: string(name='Valid', example='VALID'),
    }
  ](name='Result'),
}

model SearchContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SearchContentResponseBody(name='body'),
}

/**
 * @summary 按照特定的搜索条件搜索
 *
 * @param tmpReq SearchContentRequest
 * @param headers SearchContentHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return SearchContentResponse
 */
async function searchContentWithOptions(tmpReq: SearchContentRequest, headers: SearchContentHeaders, runtime: Util.RuntimeOptions): SearchContentResponse {
  Util.validateModel(tmpReq);
  var request = new SearchContentShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.request)) {
    request.requestShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.request, 'Request', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.requestShrink)) {
    body['Request'] = request.requestShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SearchContent',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/SearchContent`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 按照特定的搜索条件搜索
 *
 * @param request SearchContentRequest
 * @return SearchContentResponse
 */
async function searchContent(request: SearchContentRequest): SearchContentResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new SearchContentHeaders{};
  return searchContentWithOptions(request, headers, runtime);
}

model SendMessageHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model SendMessageRequest {
  url?: string(name='Url', example='http://xx'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123L'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123L'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model SendMessageShrinkRequest {
  url?: string(name='Url', example='http://xx'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model SendMessageResponseBody = {
  code?: string(name='Code', example='SUCCESS'),
  message?: string(name='Message'),
  result?: boolean(name='Result', example='true'),
}

model SendMessageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SendMessageResponseBody(name='body'),
}

/**
 * @summary 发送留言
 *
 * @param tmpReq SendMessageRequest
 * @param headers SendMessageHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return SendMessageResponse
 */
async function sendMessageWithOptions(tmpReq: SendMessageRequest, headers: SendMessageHeaders, runtime: Util.RuntimeOptions): SendMessageResponse {
  Util.validateModel(tmpReq);
  var request = new SendMessageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.url)) {
    query['Url'] = request.url;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    query['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'SendMessage',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/sendMessage`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'json',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 发送留言
 *
 * @param request SendMessageRequest
 * @return SendMessageResponse
 */
async function sendMessage(request: SendMessageRequest): SendMessageResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new SendMessageHeaders{};
  return sendMessageWithOptions(request, headers, runtime);
}

model SetDeviceSettingHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model SetDeviceSettingRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='123'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='123'),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId'),
  }(name='DeviceInfo', description='This parameter is required.'),
  key?: string(name='Key', description='This parameter is required.', example='nightMode'),
  value?: any(name='Value', example='{"enable":true}'),
}

model SetDeviceSettingShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  key?: string(name='Key', description='This parameter is required.', example='nightMode'),
  value?: any(name='Value', example='{"enable":true}'),
}

model SetDeviceSettingResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: boolean(name='Result'),
}

model SetDeviceSettingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetDeviceSettingResponseBody(name='body'),
}

/**
 * @summary 修改设备设置
 *
 * @param tmpReq SetDeviceSettingRequest
 * @param headers SetDeviceSettingHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetDeviceSettingResponse
 */
async function setDeviceSettingWithOptions(tmpReq: SetDeviceSettingRequest, headers: SetDeviceSettingHeaders, runtime: Util.RuntimeOptions): SetDeviceSettingResponse {
  Util.validateModel(tmpReq);
  var request = new SetDeviceSettingShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  var query : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    query['DeviceInfo'] = request.deviceInfoShrink;
  }

  var body : map[string]any = {};
  if (!Util.isUnset(request.key)) {
    body['Key'] = request.key;
  }
  if (!Util.isUnset(request.value)) {
    body['Value'] = request.value;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'SetDeviceSetting',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/setDeviceSetting`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改设备设置
 *
 * @param request SetDeviceSettingRequest
 * @return SetDeviceSettingResponse
 */
async function setDeviceSetting(request: SetDeviceSettingRequest): SetDeviceSettingResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new SetDeviceSettingHeaders{};
  return setDeviceSettingWithOptions(request, headers, runtime);
}

model UnbindAligenieUserHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model UnbindAligenieUserRequest {
  loginStateAccessToken?: string(name='LoginStateAccessToken', description='This parameter is required.', example='99ce8a70c23a94f8569e1a525bef6e85'),
}

model UnbindAligenieUserResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='73C67BD9-175A-1324-8202-9FAABBB3E6FA'),
  success?: boolean(name='Success'),
}

model UnbindAligenieUserResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindAligenieUserResponseBody(name='body'),
}

/**
 * @summary 解除三方和精灵账号的关系
 *
 * @param request UnbindAligenieUserRequest
 * @param headers UnbindAligenieUserHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindAligenieUserResponse
 */
async function unbindAligenieUserWithOptions(request: UnbindAligenieUserRequest, headers: UnbindAligenieUserHeaders, runtime: Util.RuntimeOptions): UnbindAligenieUserResponse {
  Util.validateModel(request);
  var body : map[string]any = {};
  if (!Util.isUnset(request.loginStateAccessToken)) {
    body['LoginStateAccessToken'] = request.loginStateAccessToken;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindAligenieUser',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/unbindAligenieUser`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解除三方和精灵账号的关系
 *
 * @param request UnbindAligenieUserRequest
 * @return UnbindAligenieUserResponse
 */
async function unbindAligenieUser(request: UnbindAligenieUserRequest): UnbindAligenieUserResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new UnbindAligenieUserHeaders{};
  return unbindAligenieUserWithOptions(request, headers, runtime);
}

model UnbindDeviceHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model UnbindDeviceRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PROJECT_ID'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model UnbindDeviceShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model UnbindDeviceResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message', example='success'),
  requestId?: string(name='RequestId', example='0EC7*726E'),
  result?: boolean(name='Result', example='true'),
}

model UnbindDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindDeviceResponseBody(name='body'),
}

/**
 * @summary 解绑设备
 *
 * @param tmpReq UnbindDeviceRequest
 * @param headers UnbindDeviceHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindDeviceResponse
 */
async function unbindDeviceWithOptions(tmpReq: UnbindDeviceRequest, headers: UnbindDeviceHeaders, runtime: Util.RuntimeOptions): UnbindDeviceResponse {
  Util.validateModel(tmpReq);
  var request = new UnbindDeviceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UnbindDevice',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/unbindDevice`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 解绑设备
 *
 * @param request UnbindDeviceRequest
 * @return UnbindDeviceResponse
 */
async function unbindDevice(request: UnbindDeviceRequest): UnbindDeviceResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new UnbindDeviceHeaders{};
  return unbindDeviceWithOptions(request, headers, runtime);
}

model UpdateAlarmHeaders {
  commonHeaders?: map[string]string,
  xAcsAligenieAccessToken?: string(name='x-acs-aligenie-access-token'),
  authorization?: string(name='Authorization'),
}

model UpdateAlarmRequest {
  deviceInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='DAFE****ce3ej='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='DeviceInfo', description='This parameter is required.'),
  payload?: {
    alarmId?: long(name='AlarmId', description='This parameter is required.', example='1234567'),
    musicInfo?: {
      musicId?: long(name='MusicId', description='This parameter is required.', example='2'),
      musicName?: string(name='MusicName', description='This parameter is required.'),
      musicType?: long(name='MusicType', description='This parameter is required.', example='12'),
      musicTypeName?: string(name='MusicTypeName', description='This parameter is required.'),
      musicUrl?: string(name='MusicUrl', example='http://music-url.mp3'),
    }(name='MusicInfo', description='This parameter is required.'),
    scheduleInfo?: {
      once?: {
        day?: int32(name='Day', example='1'),
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
        month?: int32(name='Month', example='8'),
        year?: int32(name='Year', example='2022'),
      }(name='Once'),
      statutoryWorkingDay?: {
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
      }(name='StatutoryWorkingDay'),
      type?: string(name='Type', description='This parameter is required.', example='WEEKLY'),
      weekly?: {
        daysOfWeek?: [ int32 ](name='DaysOfWeek'),
        hour?: int32(name='Hour', example='10'),
        minute?: int32(name='Minute', example='0'),
      }(name='Weekly'),
    }(name='ScheduleInfo', description='This parameter is required.'),
    volume?: int32(name='Volume', example='40'),
  }(name='Payload', description='This parameter is required.'),
  userInfo?: {
    encodeKey?: string(name='EncodeKey', description='This parameter is required.', example='12**45'),
    encodeType?: string(name='EncodeType', description='This parameter is required.', example='PACKAGE_NAME'),
    id?: string(name='Id', description='This parameter is required.', example='HOFF****my7Iw='),
    idType?: string(name='IdType', description='This parameter is required.', example='OPEN_ID'),
    organizationId?: string(name='OrganizationId', example='1**2'),
  }(name='UserInfo', description='This parameter is required.'),
}

model UpdateAlarmShrinkRequest {
  deviceInfoShrink?: string(name='DeviceInfo', description='This parameter is required.'),
  payloadShrink?: string(name='Payload', description='This parameter is required.'),
  userInfoShrink?: string(name='UserInfo', description='This parameter is required.'),
}

model UpdateAlarmResponseBody = {
  code?: int32(name='Code', example='200'),
  message?: string(name='Message'),
  requestId?: string(name='RequestId', example='43***28C-A810-5***-8747-EC226A086881'),
  result?: boolean(name='Result', example='true'),
}

model UpdateAlarmResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateAlarmResponseBody(name='body'),
}

/**
 * @summary 更新闹钟
 *
 * @param tmpReq UpdateAlarmRequest
 * @param headers UpdateAlarmHeaders
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateAlarmResponse
 */
async function updateAlarmWithOptions(tmpReq: UpdateAlarmRequest, headers: UpdateAlarmHeaders, runtime: Util.RuntimeOptions): UpdateAlarmResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateAlarmShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.deviceInfo)) {
    request.deviceInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.deviceInfo, 'DeviceInfo', 'json');
  }
  if (!Util.isUnset(tmpReq.payload)) {
    request.payloadShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.payload, 'Payload', 'json');
  }
  if (!Util.isUnset(tmpReq.userInfo)) {
    request.userInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userInfo, 'UserInfo', 'json');
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.deviceInfoShrink)) {
    body['DeviceInfo'] = request.deviceInfoShrink;
  }
  if (!Util.isUnset(request.payloadShrink)) {
    body['Payload'] = request.payloadShrink;
  }
  if (!Util.isUnset(request.userInfoShrink)) {
    body['UserInfo'] = request.userInfoShrink;
  }

  var realHeaders : map[string]string = {};
  if (!Util.isUnset(headers.commonHeaders)) {
    realHeaders = headers.commonHeaders;
  }
  if (!Util.isUnset(headers.xAcsAligenieAccessToken)) {
    realHeaders['x-acs-aligenie-access-token'] = Util.toJSONString(headers.xAcsAligenieAccessToken);
  }
  if (!Util.isUnset(headers.authorization)) {
    realHeaders['Authorization'] = Util.toJSONString(headers.authorization);
  }
  var req = new OpenApi.OpenApiRequest{ 
    headers = realHeaders,
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateAlarm',
    version = 'ssp_1.0',
    protocol = 'HTTPS',
    pathname = `/v1.0/ssp/updateAlarm`,
    method = 'POST',
    authType = 'AK',
    style = 'ROA',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新闹钟
 *
 * @param request UpdateAlarmRequest
 * @return UpdateAlarmResponse
 */
async function updateAlarm(request: UpdateAlarmRequest): UpdateAlarmResponse {
  var runtime = new Util.RuntimeOptions{};
  var headers = new UpdateAlarmHeaders{};
  return updateAlarmWithOptions(request, headers, runtime);
}

